The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Validating a field or check box, not both. - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8) +--- Forum: Form Validation: JS + PHP (https://forums.formtools.org/forumdisplay.php?fid=18) +--- Thread: Validating a field or check box, not both. (/showthread.php?tid=723) |
Validating a field or check box, not both. - Big Al - May 28th, 2010 I have a simple form (using process.php) with a date field (including the calendar button) and a check box. The set up is this: the submitter can either choose a date or check a box for "Any dates". My issue is validating one or the other but not both. So, one of the 2 has to be filled, either they enter a date, or they check the box. I have not been able to get it to work corretly using the standard: rules.push("required,,"); rules. It works (it validated the field) but not the way I need it to. I have not tried using the API for this form, and I would prefer not to, if possible. Any ideas? Thanks AL |