Validation of email based on checkbox
-
Hi
I am looking for some help regarding validation of form before submitting.
Scenario is :
I have two fields Phone and Email and exclusive checkbox with two options phone and email.
Checkbox is to ask from visitor if he/she will be contacted by email or phone.
What I want is that:
If visitor check phone then Phone field must be filled (kind of validation to see if visitor forget to add phone field)Similarly If visitor check email then Email field must be filled if user forget to fill.
Another scenario can be if I put the checkboxes before Email and Phone field and ask the user to select first, if user select email then Email field should be visible otherwise Phone field should appear if user check phone.
Thanks for reading and any help will be highly appreciated.
- The topic ‘Validation of email based on checkbox’ is closed to new replies.