This topic is locked
[SOLVED]

 How do I ... Validate Checkbox has been checked?

3/3/2014 5:35:35 PM
PHPRunner General questions
I
ISelb author

PHPRunner 7.0 -

mySQL DB
I have a TINYINT length=1 field to be used for a checkbox.
The checkbox default is set to "0".
How do I ensure the checkbox has been checked when user submits form??

W
wildwally 3/5/2014



PHPRunner 7.0 -

mySQL DB
I have a TINYINT length=1 field to be used for a checkbox.
The checkbox default is set to "0".
How do I ensure the checkbox has been checked when user submits form??


Couple different options:

  1. add an if condition in Before Record Add events that check if value = 1 if not return false with message.
  2. utilize javascript to disable button until checkbox is checked.
    If your looking for how to determine if the checkbox is checked there are plenty of examples for both php and javascript already in the forums.