Pre-Fill Visible Field in Form Based On URL Parameter | Community
Skip to main content
Level 3
Feb 27, 2020 9:57 PM UTC
Solved

Pre-Fill Visible Field in Form Based On URL Parameter

Hello,

 

I am wondering if it's possible to pre-fill a visible form field (such as product of interest) in a Marketo form. For instance, if someone on our website clicks the "Contact Us" button from a specific product page, I want the "Product of Interest" field to be populated with the referring URL. However, I'd like the form filler to be able to see the selection, and have the option to edit their selection if they wish.


I know how to do this with an invisible field, but haven't figured out if/how it's possible for a visible field.

 

Is this possible without custom JS?


Thanks!

 

Steve

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Feb 27, 2020 10:25 PM UTC

Is this possible without custom JS?

No, it's only possible using JS, which is already written here: https://codepen.io/figureone/pen/5bf736062cdf6b4fa20487235abfe88a

4 replies

SanfordWhiteman
Level 10
Mar 3, 2020 6:23 AM UTC

@stephens6273755 please return to the thread and mark my answer as correct, thanks.

Translate
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Feb 27, 2020 10:25 PM UTC

Is this possible without custom JS?

No, it's only possible using JS, which is already written here: https://codepen.io/figureone/pen/5bf736062cdf6b4fa20487235abfe88a

Translate
Community Manager
Feb 27, 2020 11:46 PM UTC

@sanfordwhiteman, I really want to know how you keep all your codepen files so organized that you could pull that out so quickly. I bet you make librarians jealous!

Translate
SanfordWhiteman
Level 10
Feb 28, 2020 12:10 AM UTC

Well, there aren't that many of them. 🙂

Translate