New field not validating w/FF- no validation with IE

mark.duck 05 Aug, 2009
Using ChronoForms 3.0 Stable and Joomla! 1.5.8 Production/Stable

Added new field and can't get it to validate. All other fields are validating fine.

It is a checkbox to Ack Terms and Conditions. Added the field name to the "required" list on validation tab.

Also, just noticed that IE 7 and 8 don't validate ANY fields. Firefox validates fine except for the new field.

Link to form:
http://www.pmigno.org/index.php?option=com_content&view=category&layout=blog&id=158&Itemid=164

Any help would be appriciated.

Thanks,
Mark Duck
GreyHead 05 Aug, 2009
Hi Mark.

Techically you can't 'require' a checkbox - required checks the field value and a checkbox (radio button or drop-down) always has one and so they always show up as valid. Use 'validate-one-required' instead - this checks for the 'selected' or 'checked' attribute which does change.

Bob
mark.duck 05 Aug, 2009
I've already tried both. Tried your suggestion again and it still successfully submits without checking the box. Also, when I check the value in the database, it is blank - as I would expect. If I check the box, the value is YES.

Also IE does not validate any of the fields. I mostly use FF and just noticed this. Not sure how long this has been occurring.

What is the next best way to validate form data over the easy way Chrono provides (in case I need to go there)?

Thanks
GreyHead 05 Aug, 2009
Hi Mark,

Please will you post a link to the form - sounds like there is a conflict somewhere.

Bob
GreyHead 06 Aug, 2009
Hi Mark,

I ran a test with IETester and validation on your form seems to be working on idividual fields in IE6 etc. but there is a JavaScript Error on submission char 4 line 131. I haven't had time to try to pin this down further. It may just be that your submit button doesn't have a name (which it doesn't).

For the checkbox, please wrap the input in a div. IIRC the checkbox array needs to have a parent for the validation to work. In this case there's only one entry but the parent is still required.

Bob
mark.duck 07 Aug, 2009
The <div> wrapper around the checkbox fixed the validation for that field. I also found some errors in my tags. Fix all that up.

However, now IE is still not validating ANY of the fields. FF works perfectly.
mark.duck 07 Aug, 2009
Regarding the IE validation - I fixed it. I used the validator.w3.org website to validate the form page after seeing you had used a tester tool yourself - good idea. Had even more errors to fix. Fixed them all with only the following two remaining. Every field in the form now validates with both IE and FF.

Lesson Learned: When having issues, use the W3 code validator.

Looks like the following two errors are in ChronoForms code.

Line 174, Column 242: document type does not allow element "form" here; missing one of "object", "applet", "map", "iframe", "ins", "del" start-tag

Line 174: <form name="ChronoContact_GNO2009PDSRegistration" id="ChronoContact_GNO2009PDSRegistration" method="post" action="http://www.pmigno.org/index.php?option=com_chronocontact&task=send&chronoformname=GNO2009PDSRegistration" >

Line 414, Column 24: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

Line 414: <div class="chronoform">
Line 415: <a href="http://www.chronoengine.com">Joomla Professional Work</a>
This topic is locked and no more replies can be posted.