Contact Form 7 form validation
-
I have a contact form with some hidden div’s which contain additional CF7 form fields.
I am using jQuery to show/hide the extra form fields based on a <select> value.
I have the form fields initially set as not required in the contact form 7 template.
I am using jQuery to add/remove the wpcf7-validates-as-required class to the input’s when shown or hidden. I’m also add the attr aria-required=”true”
However, the form fields do not validate as required after adding the css class when shown.
Is the form validation client side or server side? Is there a way to make input fields that are initially not required become required via client side changes?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Contact Form 7 form validation’ is closed to new replies.