Custom Validation rules in Forms 2.0

Anonymous
Not applicable

Custom Validation rules in Forms 2.0

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!
Tags (1)
2 REPLIES 2
Anonymous
Not applicable

Re: Custom Validation rules in Forms 2.0

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
Anonymous
Not applicable

Re: Custom Validation rules in Forms 2.0

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!