Marketo form - only can type numbers in form | Community
Skip to main content
December 29, 2017
Solved

Marketo form - only can type numbers in form

  • December 29, 2017
  • 1 reply
  • 2386 views

Has anyone else encountered this issue before? I embedded a Marketo form on a page within our website for driving leads. Sometimes when visiting the form you can only type numbers in the form fields. The form also has a 0 in it when this happens. Please note this form only has two fields, full name and email. When you refresh the page the form acts as expected. I have created and embedded Marketo forms before and never had this happen. Any help would be appreciated!

You can find the form here, under the results tab....

Tax Return Estimator | Calculate your tax refund | TaxSlayer

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Because you have a keyDown event listener on all inputs that match the selector

input:not(.allowInput), textarea, select

blocking non-numeric input.

This of course matches the fullName field.

The only reason it appears to work after a refresh (which isn't always true, only sometimes) is because you have a race condition, so it's possible for the Marketo form to be finished loading after the keyDown event binding, in which case the newly injected form fields won't be restricted.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
December 29, 2017

Because you have a keyDown event listener on all inputs that match the selector

input:not(.allowInput), textarea, select

blocking non-numeric input.

This of course matches the fullName field.

The only reason it appears to work after a refresh (which isn't always true, only sometimes) is because you have a race condition, so it's possible for the Marketo form to be finished loading after the keyDown event binding, in which case the newly injected form fields won't be restricted.

December 30, 2017

Thanks Sanford! I will apply the change today and try it out.