Custom Validation rules in Forms 2.0 | Community
Skip to main content
February 28, 2014
Question

Custom Validation rules in Forms 2.0

  • February 28, 2014
  • 2 replies
  • 854 views
I'm working on a Marketo form where default values are inserted in the form fields acting as placeholders; they disappear and re-appear depending on whether or not the user is focused on the field or not.

Problem is, Marketo is thinking these are valid field entries; how would I validate the form so shows errors on submit if the default values are still present?

Thanks!
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

March 18, 2014
Hey Jen,

If you use the hint text feature, the forms will automatically have text with reduced opacity in the fields with hint text that act as placeholders and the form will not treat these as valid entries (or attempt to validate them).

Please refer to the article here: https://community.marketo.com/MarketoArticle?id=kA050000000LH7kCAG for details on the above.

Thanks,

Jason
March 18, 2014
Hi Jason, I ended up going with that solution but placeholders are not supported in older browsers like IE9 and older. That is a big part of our customer base. I did find a jQuery plugin to compensate for this to get the placeholders to load in those browsers.

Thanks!