Forums

Required fields do not work

bvneck 22 Feb, 2013
Hi,
some fields in my form marked as required do not work - the form is sent with empty required fields, too.

The form adress is http://j25.hunnenberg.de/index.php/kettelgarne/kettelgarne-bestellen

I use Chronoform 4.0 RC3.5.2

I read a lot about mootools and jQuery issues, but as far as I can see I don't use mootools and I disabled a module with jQuery, so jQuery is not loaded at all.

What is wrong? Thanks for help!!

I bought a subscription btw, but I haven't validated it yet, because the website is not on its final domain yet.
GreyHead 22 Feb, 2013
Hi bvneck,

I don't see any required fields in the form?

There is a JavaScript error on the page from the StyleChanger in the template, that might cause problems when you set up some validations.

Bob
bvneck 22 Feb, 2013
Thanks Bob,

on the right side I have an input field "name":
<input id="name" class="cf_inputbox required" type="text" size="13" name="name" title="Pflichtfeld!">
This should mark the input field as required - or am I wrong?

I will check the javascript error, too...
GreyHead 22 Feb, 2013
Hi bvneck,

That would be OK for CFv3 but you have v4:
<input id="name" class="cf_inputbox validate['required']" type="text" size="13" name="name" title="Pflichtfeld!">


Bob
bvneck 23 Feb, 2013
Thanks Bob,

ok, I did everything you suggested:
- got rid of jQuery and StyleChanger.js
- Changed the code for the required fields, e.g. "name" on the right side, into:
<input id="name" class="cf_inputbox validate['required']" type="text" size="13" name="name" title="Pflichtfeld!" />

But still: I can send the form without filling out the required fields... WHY??

Is there anything else I have to do?
GreyHead 23 Feb, 2013
Hi bvneck,

The validation on the form without the template works Ok. There's still a JavaScript error on the template page from the StyleChanger that probably needs to be fixed:
TypeError: container is null
http://j25.hunnenberg.de/templates/hunnenberg-beez/javascript/md_stylechanger.js
Line 66

Bob
bvneck 25 Feb, 2013
Thanks Bob - that did it!
The required fields do work fine now!!
This topic is locked and no more replies can be posted.