Last active
June 13, 2022 16:02
-
-
Save spivurno/6963360 to your computer and use it in GitHub Desktop.
Gravity Wiz // Disable HTML5 Validation on Gravity Forms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Wiz // Disable HTML5 Validation on Gravity Forms | |
* http://gravitywiz.com/disable-html5-validation-on-gravity-forms/ | |
*/ | |
add_filter( 'gform_form_tag', 'add_no_validate_attribute_to_form_tag' ); | |
function add_no_validate_attribute_to_form_tag( $form_tag ) { | |
return str_replace( '>', ' novalidate="novalidate">', $form_tag ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👉 This Gist has been migrated to the Gravity Wiz Snippet Library:
http://gravitywiz.com/disable-html5-validation-on-gravity-forms/