Appointment form ammendment
Hi
How do I ammend the phone number text box in a contact from to validate a default 10 digit number to an 11 digit number?
Hi
How do I ammend the phone number text box in a contact from to validate a default 10 digit number to an 11 digit number?
you would need to edit the the spry initialization line to use a custom phone format and pattern:
for example:
var Appointment_request_group_Phone_Spry = new Spry.Widget.ValidationTextField("Appointment_request_group_Phone_Spry", "phone_number", {format:"phone_custom", validateOn:["blur"], pattern:"00000000000"});
you would also need to edit the client validation to not reformat the phone number,
Give a link to your form, Iand I will be able to give more specific instructions.
change this line:
<input id="Contact_me_group_Phone" name="Contact_me_group_Phone" type="text" value="" class="formTextfield_Large" tabindex="1" onBlur="WAValidatePN(document.getElementById('SimpleContact_NewFromBlank_Default').Contact_me_group_Phone,'',false,true,'x (xxx) xxx-xxxx',document.getElementById('SimpleContact_NewFromBlank_Default').Contact_me_group_Phone,0,true);hideServerError('Contact_me_group_Phone_ServerError');">
to:
<input id="Contact_me_group_Phone" name="Contact_me_group_Phone" type="text" value="" class="formTextfield_Large" tabindex="1" onBlur="WAValidatePN(document.getElementById('SimpleContact_NewFromBlank_Default').Contact_me_group_Phone,'',false,true,'',document.getElementById('SimpleContact_NewFromBlank_Default').Contact_me_group_Phone,0,true);hideServerError('Contact_me_group_Phone_ServerError');">
and this line:
var Contact_me_group_Phone_Spry = new Spry.Widget.ValidationTextField("Contact_me_group_Phone_Spry", "phone_number", { format:'phone_us' , validateOn:["blur"]});
to:
var Contact_me_group_Phone_Spry = new Spry.Widget.ValidationTextField("Contact_me_group_Phone_Spry", "phone_number", { format:'phone_custom', pattern:"00000000000" , validateOn:["blur"]});
Hi Jason
Thank you the Contact_me_group_Phone runs fine, except a previous error runs, mentioned on parsing error post...
Sabby76
see my reply in your other thread.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.