Forums

Validation Ignored

LikeStuff 26 Jul, 2008
Hi there,

I have the select list below on my form. On the validation tab I add "Province" as a required field but it doesn't work. What am I missing. Thanks!!

<select name="Province">
<option value="select">Province/Territory</option>
<option value="Alberta">Alberta</option>
<option value="British Columbia">British Columbia</option>
<option value="Manitoba">Manitoba</option>
<option value="New Brunswick">New Brunswick</option>
<option value="Newfoundland and Labrador">Newfoundland and Labrador</option>
<option value="Northwest Territories">Northwest Territories</option>
<option value="Nova Scotia">Nova Scotia</option>
<option value="Nunavut">Nunavut</option>
<option value="Ontario">Ontario</option>
<option value="Prince Edward Island">Prince Edward Island</option>
<option value="Quebec">Quebec</option>
<option value="Saskatchewan">Saskatchewan</option>
<option value="Yukon Territory">Yukon Territory</option>
</select>
GreyHead 26 Jul, 2008
Hi LikeStuff,

Looks as though it works OK, the first option is selected by default so it will never fail.

You need to put a dummy option in the first place then use "validate-selection".

Bob
Max_admin 26 Jul, 2008
Hi,

more clarification, make your first option like this :

<option value="">Province/Territory</option>


means, no value!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
LikeStuff 26 Jul, 2008
Great - thank you. Removing "select" and leaving it blank "" worked.

Thanks!
LikeStuff 26 Jul, 2008
Oh Oh😟

The validation seems to only work if I view the form via the link in forms management. But if the form is embeded in an article using this "{chronocontact}membershipregistration{/chronocontact}" in Firefox it validates the first item on the form and in IE it ignores all validation.
GreyHead 26 Jul, 2008
Hi likestuff,

That sounds like a JavaScript conflict with something else on your page. Which version of Joomla do you have? With 1.5.x you should probably select the MooTools library on the Anti-Spam tab. If that doesn't fix it then you are in for some JavaScript debugging: turn off other features on your page one by one until you find what is conflicting.

Bob
LikeStuff 26 Jul, 2008
Hi Greyhead,

I am using J1.5.3. Turning on Mootools helped a bit. It works fully in Firefox. But in IE it does not work consistently. The first field always works, but once that field is filled in there is no guarantee the others will work. Unless the user clicks in the field then clicks outside the field without entering any data - the validation message will then appear.
Max_admin 27 Jul, 2008
are you sure no other libraries are loaded, I see no reason for this to happen! does it give any js errors in IE after the first field is validated ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 27 Jul, 2008
by the way, which template you are using on your website, I should tell that some templates out there including the JA_Purity loaded into Joomla 1.5.4 (dont know if its in 1.5.3 also) makes some IE errors by default through the many js files loaded into it, try to disable validation and see if your IE gives any js errors at the bottom left ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.