Forums

Validation Question....

cb1 17 Feb, 2012
Hey,

1 - I used my own code for my form and did not use the wizard.

2 - I did, however, use the wizard for validation purposes "Simple Server Side Validation"

3 - When I don't fill in a field THEN Submit - it gives me generic error messages. (SEE attached)

4 - I would like for it to react the way the windows do with error messages poppoing up "On Blur" OR at least show Error messages that fit each field as opposed to it simply saying "This field is required".

Can anyone point me in the right direction? I really don't want to rebuild the form from scratch, that's why I just copied the code into the form window as opposed to the wizard.

Thanks!
GreyHead 17 Feb, 2012
Hi cb1,

Well, serverside validation is run on the server after the form is submitted so it can't possibly give you messages onBlur. For that you need the Client side validation and you'll need to add the appropriate classes to your HTML to trigger it e.g. validate['required'], validate['alpha'], etc.

Bob
cb1 17 Feb, 2012
Is there an example of that I can follow somewhere?
GreyHead 18 Feb, 2012
Hi cb1,

Here's a simplified version of the Form HTML from a dummy form Ijust created with all the validation boxes checked. This should tell you what you need:
<input class=" validate['required','alpha','alphanum','digit','nodigit','number','email','phone','phone_inter','url']" type="text"  name="input_text_0" />

<select size="1" class=" validate['required']" title="" name="input_select_1"> . . .</select>

<input type="checkbox" name="input_checkbox_group_2[]" value="choice 1" class="validate['group[2]']" />
<input type="checkbox" name="input_checkbox_group_2[]"  value="choice 2" class="validate['group[2]']" />

<input type="radio" name="input_radio_3" id="input_radio_3_no" title="" value="No" class="validate['required']" />
<input type="radio" name="input_radio_3" id="input_radio_3_yes" title="" value="Yes" class="validate['required']" />

Bob
This topic is locked and no more replies can be posted.