SOLVED

Form Validation Behavior Issue

Go to solution
Jason_Keller3
Level 2

Form Validation Behavior Issue

Hi there,

It looks like this thread is related, but does not answer the question: https://nation.marketo.com/message/194671-re-form-validation-behavior#194671

Right now on the mkto form I am using, the error message appears not upon form submit, but rather after clicking on an empty field for the second time. Is there any way to adjust this validation to occur upon form submit or to change the validation to trigger after the third or fourth time an empty field is clicked upon?

Thanks,

Jason

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Form Validation Behavior Issue

Check this out: MktoForms2 :: Defer onFocusIn errors until button click

It's a hack and a half but let me know if you have any issues.

View solution in original post

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: Form Validation Behavior Issue

Right now on the mkto form I am using, the error message appears not upon form submit, but rather after clicking on an empty field for the second time.

Hmm, something's wrong with your form if so. Native validation runs on submit, always, in addition to the sometimes unwanted validation on focus.

Jason_Keller3
Level 2

Re: Form Validation Behavior Issue

It is running on submit; the thing I'd love to adjust is the on-focus behavior. It is actually a small thing, but the biggest reason is that one the validation error is triggered, it appears on every require field on focus. That is the part I find clunky.

Jason_Keller3
Level 2

Re: Form Validation Behavior Issue

once*

SanfordWhiteman
Level 10 - Community Moderator

Re: Form Validation Behavior Issue

OK, ya did say "appears not upon form submit." 

There is a way to turn this off, but I can't get to it immediately.

Jason_Keller3
Level 2

Re: Form Validation Behavior Issue

I was typing too fast... sorry about that! And yeah it is a pretty low priority; I am realizing most folks will not be affected by that validation behavior.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form Validation Behavior Issue

Check this out: MktoForms2 :: Defer onFocusIn errors until button click

It's a hack and a half but let me know if you have any issues.

View solution in original post