Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: trojnfn
I have a form with the following fields :
<cfinput type="text" name="return_to_supplier_supplier_number" onValidate="validateOptionTextBox" message="Supplier number is required">
<cfinput type="checkbox" name="not_valid_supplier" value="NVS"> Not a Valid Supplier
The input field is required and the onValidate part does work, diplaying the error message if I leave it blank. However, if they check the checkbox, then the input field becomes optional. What I would like to do is put a cfif around the onvalidate based on the checkbox. If the checkbox is check, then do not validate, if it is unchecked, then validate.
How can that be done, or this there a better way ? Thanks
Copy link to clipboard
Copied