Public Voice Network
- the gif animation thread 25692569
- NYC Freelance Web Designe… 11
- Chick of the Day 66666666
- Replica Eames Herman Mill… 88
- website critique please 99
- Pic of the Day 2765727657
- Bag of Skulls 9393
- unrestricted iphone - leg… 1717
- Vid of the Day 21562156
- HTML5 + JQuery + MP3 77
- bike building Q 77
- Canon live view question 66
- Portraits 77
- Breaking Bad 103103
- I LOVE QBN 3131
- Greatest motivational spe… 88
- I just quit facebook 3535
- Does HTML5 really beat Fl… 6666
- Beer of the day 1919
- Politics 1124011240
- Sarcastic Comment of the … 146146
- Chipotle 110110
- I Love Pubs 55
- grid wordpress
Form validation? 1212 Responses
Last post: 1 month, 1 week 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



