Manditory check box on submit form

3 posts by 2 authors in: Forums > CMS Builder
Last Post: August 30, 2011   (RSS)

By Toledoh - August 29, 2011

Hi Guys,

I need to have a checkbox "ticked" prior to a form being submitted.

the field is "declaration", and I've set up the form as
<input name="declaration" type="checkbox" value="<?php echo htmlspecialchars(@$_REQUEST['declaration']) ?>">

I've also got in the error checking;
if (!@$_REQUEST['declaration']) { $alertsAndErrors .= "You tick your declaration!<br/>\n"; }

But this doesn't work... any ideas?
Cheers,

Tim (toledoh.com.au)

Re: [Dave] Manditory check box on submit form

By Toledoh - August 30, 2011

That certainly helps! Thanks Dave
Cheers,

Tim (toledoh.com.au)