Forums

After update validation failed..

tullski 18 Aug, 2008
Hi,

just recognized that my old forms won`t get validated.
I can send the form, even if there are empty.
This seems to appear on textarea and checkboxes
textarea
<textarea style="border:1px solid #FF9900"  name="job" cols="55" rows="3"></textarea>

Validation:
required (not blank):job

checkbox
<div class="validate-one-required" align="center">
<input name="acceptedterms"  type="checkbox" value="0"  />
<a href="#" target="_blank"> terms</a></div>

Validation:
validate-one-required:acceptedterms

Both can be send if fields are empty. No validation message appear.
If i click in a textarea field - the validation message suddenly appears.

thx
M
Max_admin 18 Aug, 2008
Hi M,

but your code tags don't have the classes!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tullski 19 Aug, 2008
Hi Max,

still don`t work. Now i have it like this....

checkbox
<div class="validate-one-required" align="center">
<input class="validate-one-required"  name="acceptedterms"  type="checkbox" value="0"  />
<a href="#" target="_blank"> terms</a></div>



textarea
<div class="validate-one-required" >
<textarea class="validate-one-required" style="border:1px solid #FF9900" name="job" cols="55" rows="3"></textarea>
</div>


I can send the form without validation.

thx
M
GreyHead 19 Aug, 2008
Hi tullski,

Looking at the JavaScript I think that validate one required only works with Input fields - try plain 'required' for the textarea.

Not sure about the checkbox though - maybe remove the class from the div (it's only needed in the tag) and see if that helps.

If you are putting class names in the tags then you should *not* put the field names in the Validation tab as this will give a second class attribute (true for CF v2.5 don't know about v3).

Bob
tullski 19 Aug, 2008
Thx Bob,

but it`s simply not working.
Removed all filed names from the validation tab and used class required for textarea and validate-one-required for checkbox.

🤨

Attached the form
Thx
GreyHead 19 Aug, 2008
Hi tullski,

The textareas validate OK.

You have a value set for the checkbox - possibly this is causing problems.
Firebug also shows a JavaScript error for the validate-one-required code.

Bob
tullski 19 Aug, 2008
mmmhh...

Textaeras only validating if you click into them.
For checkboxes i removed the value and still no luck?

I use the newest version of cf.

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