PHP validation base on Yes/No element

Status
Not open for further replies.

dimoss

Well-Known Member
Hi

I have two fields in a form. The first is Yes/No element and the second a field (numeric).
I have put a php validation on the second field to narrow the entered values between 3 to 5 and it works putting
PHP:
$min = 3;
$max = 5;
return ($min <= $data) && ($data <= $max);

This works when the Yes/No element is on Yes but it returns also the same error when the Yes/No element is No even if I have put

PHP:
$wt = '{fab_prel___wt_raw}';
$wt == 1;

in condition where fab_prel___wt is the Yes/No element.

Thanks
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top