• Home
  • Pricing
  • Free Resources
  • About
  • Docs
  • Support
  • Account

Gravity Wiz

Magically enhanced tutorials, snippets and plugins for Gravity Forms!

  • Gravity Perks
    • Gravity Perks
    • Pricing
  • Blog
    • Free Resources
    • About
  • Support
    • Docs
    • Support
    • Account

Disable HTML5 Validation on Gravity Forms

An easy way to disable HTML5 validation on your Gravity Forms.

Last updated August 21, 2019 | Written by Jordan Smith 12 Comments

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 CodeDownload Plugin

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.
    • Already have a license? Download Latest Gravity Forms
    • Need a license? Buy Gravity Forms
  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!

Filed Under: Uncategorized

Comments

  1. James Simpon says

    September 28, 2022 at 1:07 am

    Hi, This snippet still valid? as its not working as disabling html5 output in gravity form setting Eg. if we are editing an entry , then the validation prohibiting again. but disabling html5 in settings then its work as expected.

    Reply
    • Dario Space says

      September 28, 2022 at 8:46 am

      Hi,

      When testing locally, this seems to be working. If you’re a Gravity Perks customer, drop us a line and we’ll look into it.

      Best,

  2. Chris says

    March 25, 2019 at 7:55 pm

    Just wanted to thank you for this post – although we didn’t use this snippet, it did push in the right direction to enabling the “Output HTML5” setting for our form. Much appreciated!

    Reply
    • David Smith says

      March 25, 2019 at 9:18 pm

      Glad to help, Chris!

  3. Victor Ramirez says

    May 31, 2018 at 9:23 am

    Is there a benefit using this instead of ‘disable html5 output’ in the Gravity Forms settings?

    Reply
    • David Smith says

      June 4, 2018 at 11:09 am

      It will have the same effect but disabling HTML5 also disables ALL HTML5 features, not just the HTML5 validation.

  4. Rob says

    April 26, 2017 at 5:09 pm

    welp, this broke my site. It wasn’t clear that only part of it needed to be in the functions.php file. I mistakenly added all of it to the existing code. -__-

    Reply
    • David Smith says

      April 26, 2017 at 5:30 pm

      Hi Rob, it sounds like you’ve already got this fixed but if not, this will help: https://gravitywiz.com/documentation/snippet-troubleshooting/

  5. bruce says

    March 18, 2015 at 10:21 am

    Perfect little snippet! Thanks for this easy fix.

    Reply
    • David Smith says

      March 18, 2015 at 10:37 am

      Glad you found it useful!

  6. Jermain says

    September 5, 2014 at 9:40 pm

    Where do i direct pre sale questions?

    Reply
    • Jordan Smith says

      September 5, 2014 at 9:52 pm

      Hi Jermain,

      There is a link on the Gravity Perks sales page to the pre sales form but for easy access, here you go! Question about Gravity Perks?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.

Recent Posts

  • How to Create Timesheets with Gravity Forms
  • Spotlight: Auto Classmate’s AI Powered Teaching Tools
  • Introducing Gravity Forms OpenAI Beta 1 featuring GPT 3.5 Turbo
  • Spotlight: building an internal payroll tool using Gravity Forms Entry Blocks
  • Our 46th perk is here. Say hello to Advanced Save & Continue.

Categories

  • How To (79)
  • News (25)
  • Plugins (21)
  • Releases (20)
  • Resource (4)
  • Snippets (54)
  • Spotlights (20)
  • Tutorials (58)
  • Updates (182)

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2023 · Powered by WordPress · Gravity Wiz LLC

  • Support
  • Affiliates
  • About
  • Sitemap
  • Terms & Conditions of Use
  • Privacy Policy
  • Cookies Policy