Hi There,
We have a Marketo form with a hidden field and a default value set. However, upon submission, the default value does not populate on the record. What could be the reason? Please let us know
Solved! Go to Solution.
OK, checked it out and this isn’t a Marketo issue, it’s in your custom code.
Marketo is correctly setting the default value for the hidden field Country (that is, “India”).
But then when someone fills in the Email field, you’re invoking ZoomInfo’s FormComplete JS, which is trying to guess/enrich the Country itself. If it it doesn’t succeed, it blanks out Country rather than leaving the original value. You need to change that logic.
Can you please share a screenshot of how you are setting the default value? It might help to see a visual and understand the data type.
Here is the screenshot of the field details.
That screenshot isn't showing the Autofill details.
Please provide the URL of your page so we can look at it live. There's no need to hypothesize!
It's not a marketo landing page: https://www.qualys.com/lp/tp1/ciso-risk-dialogue/
Please let us know if we have missed any details in the backend.
OK, checked it out and this isn’t a Marketo issue, it’s in your custom code.
Marketo is correctly setting the default value for the hidden field Country (that is, “India”).
But then when someone fills in the Email field, you’re invoking ZoomInfo’s FormComplete JS, which is trying to guess/enrich the Country itself. If it it doesn’t succeed, it blanks out Country rather than leaving the original value. You need to change that logic.
Thanks @SanfordWhiteman , for checking it. Just for my knowledge, can you please let me know, how and where you checked, just to confirm?
Checked the current values in the Dev Tools Console when the page first loaded:
MktoForms2.whenReady(function(readyForm){
console.log(readyForm.getValues());
});
Filled in the Email field (and noticed the request firing off to ZoomInfo.)
Checked the values again.