Form Validation Behavior Issue | Community
Skip to main content
Jason_Keller3
Level 2
Aug 28, 2018 4:56 PM UTC
Solved

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

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Aug 29, 2018 6:20 AM UTC

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.

6 replies

SanfordWhiteman
Level 10
Aug 28, 2018 5:05 PM UTC

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.

Translate
Jason_Keller3
Level 2
Aug 28, 2018 5:09 PM UTC

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.

Translate
Jason_Keller3
Level 2
Aug 28, 2018 5:10 PM UTC

once*

Translate