Forums

Custom Field set as required

sbischoff 06 Dec, 2012
Hi there,

I have another question:

I want to use a checkbox on confirmation page, which the user have to check to accept the terms and conditions. This checkbox has to be marked as "required". So I need a message, if the user click "submit" without checking the checkbox first.

I use this code
<div class="ccms_form_element cfdiv_checkbox" id="zustimmung_container_div" style=""><input type="hidden" name="zustimmung" value="" alt="ghost" />
<input value="1" id="zustimmung" title="zustimmung" type="checkbox" class="validate['required'] label_left" name="zustimmung" />
<label for="zustimmung">Hiermit bestätige ich, dass ich die obigen Anmeldebedingungen gelesen und verstanden habe und akzeptiere.</label><div class="clear"></div><div id="error-message-zustimmung"></div></div>


But it doesn't work, I can click "submit" and the form goes on...😟

Can you help me out of this please!?

Best regards
Steffen
GreyHead 06 Dec, 2012
Hi Steffen,

I think this should work OK. The code looks OK to me, provided that the Form Validation is enabled.

Please post a link to the form so I can take a quick look.

Bob
sbischoff 11 Dec, 2012
Hi Bob,

did you find the time to have a look at our form?

Thank you and kind regards
Steffen
GreyHead 12 Dec, 2012
Hi Steffen,

Sorry for the delay, I was away at the weekend and am still working back though previous posts here.

There's no checkbox on the form to check :-( The validation works if I view the form without the template. With the template there is a JavaScript error showing in the MooMenu code. I suspect this may be because you are loading the ProtoType library on the page but I haven't looked into that.

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