Public Voice Network
- Website design in NYC?
- Pic of the Day 5933759337
- Chick of the Day 1430514305
- Dark Knight Rises 509509
- torrentday.com 1111
- What do you call... 3838
- Bureau of Trade 1313
- Girl + Drinking + Music 1010
- Online Printing 44
- the gif animation thread 1131511315
- *¨*•。★ Wedding Day Book 55
- Windows software on Mac 1313
- where to get infographics… 1111
- responsive design on a gr… 66
- blog 5557355573
- FMT 020312 4242
- QBN+ Challenge 26 4040
- Photographers site 55
- Internet crackdown coming… 138138
- Politics 1757517575
- crash n' burn 66
- Vid of the Day 1094210942
- Script What the Font 33
- what the blog? 33
Form validation? 1212 Responses
Last post: 2 years ago | Thread started: Feb 8, 10, 1:15 p.m.
- fugged
submit handler function should return false to prevent the form from submitting.
so in your handler function you need to test and see if the checkbox is checked. if so, return true - (and the for will submit) otherwise return false (and the form will be prevented from submitting)


- Dog-earFeb 8, 10, 1:27 p.m. – Permalink
- fugged
I gotcha boobs. check it again.:
http://gist.github.com/298594

- Dog-earFeb 8, 10, 1:42 p.m. – Permalink
- ayport
Can always do it server side:
HTML:
<form action="formProcessor.php" method="post">
<input type="checkbox" value="yes" name="checkbox">
<input type="submit">
</form>PHP (asp or asp.net works the same):
<?
if ($_POST['checkbox'] == "yes")
{
// process rest of form
}
else
{
echo "please check the box";
}
?>

- Dog-earFeb 8, 10, 2:15 p.m. – Permalink



