PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

html5 custom validation messages

  1. Hi,

    maybe I missed something but i wasn't able to find any info on that topic. If I'm not mistaken, ... turning on "output html5" also means, that custom validation messages doesn't work atm, since I haven't found any occurrence of setCustomValidity or novalidate. If so,... it would be cool to mention it, for example on the settings page ;)

    thanks.

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  2. That has not yet been reported. The HTML5 output creates validation errors with XHTML strict sites, so we give you the option to turn that off. It should not have any effect on the output of custom error messages. Can you explain what you're doing and what does not work? We'll try to recreate the issue and see if the Output HTML5 setting has an effect. Thank you.

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  3. Hi Chris,

    I'm working on a theme (doctype html5) and do not have any plugins that should conflict with GF (WPML, Advanced Custom Fields and a plugin I'm working on). I have a super simple form with one email input and a submit button and a custom error message. When I turn on HTML5 the browser validates the element like it should (more or less) but doesn't display the custom error message I've set but the browsers(latest chrome) default one. So I've searched the GF plugin folder for setCustomValidity() but did not find any calls to it, nor anything that disables the html5 validation - so I assume that GF currently does not support custom error messages for html5. Note: it's the browser html5 implementation that renders the error message, not GF - so I don't talk about GF's error rendering (works fine) - it's just about passing the custom error message to the constraint validation API.

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  4. Note: it's the browser html5 implementation that renders the error message

    I understand now. I will let the development team know about your experience. Thank you.

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  5. You are correct. Gravity Forms doesn't currently support custom error messages for the HTML5 validation. That is something we will definitely want to implement in the future, and I will mention it to the team, but I don't have a timeline for it. Thanks for the heads up!

    Posted 11 years ago on Thursday December 27, 2012 | Permalink

This topic has been resolved and has been closed to new replies.