Quantcast
Channel: Snippets Archives - Gravity Wiz
Viewing all articles
Browse latest Browse all 196

Disable HTML5 Validation on Gravity Forms

$
0
0

Why we created this snippet?

There are a number of reasons why you might be looking for a snippet like this. We wrote the snippet originally after encountering an issue with a form not submitting if a user entered an incorrect email, even after correcting the mistake. There was a conflict between Gravity Forms preventing double submissions and the browser based support of HTML5 validation. Our fix was to disable HTML5 validation and rely on the Gravity Forms validation.

View this code snippet on GitHub.

How do I get started?

  1. This will work with even Gravity Forms v1.0 but that’s no excuse not to be running the latest version.
  2. Copy and paste the snippet into your theme’s functions.php file.
  3. Once you have installed the snippet, you’re good to go! This one’s plug and play.
For greater control over the attributes on the form tag, make sure to check out our Gravity Forms Tag Editor plugin.

If you use it and like it, let us know!


Viewing all articles
Browse latest Browse all 196

Trending Articles