Contact Form 7 doesn’t use jQuery for validation.
Thread Starter
kszum
(@kszum)
Hi,
Thank for you quick reply.
Please, let me rephrase. Is there a way to conditionally disable in-browser validation for single input fields? For example, if checkbox is ticked the date field becomes optional. Thanks.
Thread Starter
kszum
(@kszum)
This does not help as there is no way to prevent default rules to be added to the schema, or to remove them.
You can prevent default rules from being added to the schema by calling remove_action( 'wpcf7_swv_create_schema', $callback ).
Thread Starter
kszum
(@kszum)
It works perfectly, thank you.
Is there a way to force in-browser validation to remove wpcf7-not-valid-tip? I tried to do it with custom js event attached to a checkbox, but I believe, there maybe a case of race conditions between my script and validation process, which prevents removing the element. Thanks.