[Plugin: Contact Form 7] Conditional Validation with jQuery?
-
I was hoping to be able to do something like this to make another field required based on a drop-down value:
$('select.previous').change(function(){ if($('select.previous').get(0).selectedIndex == 1) { $('.otheraccount').addClass('wpcf7-validates-as-required'); } else { $('.otheraccount').removeClass('wpcf7-validates-as-required'); } });The class is getting added, but CF7 isn’t able to recognize it as required. Is this possible with jQuery?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘[Plugin: Contact Form 7] Conditional Validation with jQuery?’ is closed to new replies.