SOLVED

Re: Passing Data to Form from Email

Go to solution
Eben_Saputra
Level 3

Hi there,

  • We want to send out email survey.
  • Inside the email, there is a 5 star rating.
  • Recipient can click any of the star, and they are taken to Survey landing page.
  • The landing page also has the same 5 star rating, which correspond to whatever rating they choose previously.

Question:

How to pre-populate the form with choice selected from email?

The simplest way to do achieve this is by linking each star to different landing page.

Each landing page will have Hidden Field for chosen Survey Score field.

But this will quickly become cumbersome to create and maintain; I have to create 15 landing pages, and much more as the scale increases.

Tags (2)
1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator
  • At Email, each star will have certain parameter embedded (to their destination URL?)
  • At Landing page, a script will take that parameter (from the URL?) to pre-fill the radio button

Any resources that you can point to sending and receiving these parameters?

There's nothing special here. It's standard Form Editor Hidden field Auto-Fill functionality, fill from query param.

View solution in original post

15 REPLIES 15
Michael_Florin
Level 10
SanfordWhiteman
Level 10 - Community Moderator

The links are aren't really relevant (more like wrong!) for Marketo forms and LPs.

Eben_Saputra
Level 3

Sanford Whiteman
Thanks for the reply!

Yeah I figured ​that I will need custom CSS for star rating.

We altered the radio button with CSS before, so I think it will not be a big problem

As for the main question:

I take that you are suggesting is

  • At Email, each star will have certain parameter embedded (to their destination URL?)
  • At Landing page, a script will take that parameter (from the URL?) to pre-fill the radio button

Any resources that you can point to sending and receiving these parameters?

Thanks,

Eben

SanfordWhiteman
Level 10 - Community Moderator
  • At Email, each star will have certain parameter embedded (to their destination URL?)
  • At Landing page, a script will take that parameter (from the URL?) to pre-fill the radio button

Any resources that you can point to sending and receiving these parameters?

There's nothing special here. It's standard Form Editor Hidden field Auto-Fill functionality, fill from query param.

Eben_Saputra
Level 3

Thanks Sanford, it works as prescribed.

In my case, I use Referrer Parameter instead of URL Parameter

Now I need to somehow connect the visible star button to the stored value, but that is for different case.

Thanks as always!

SanfordWhiteman
Level 10 - Community Moderator

Glad it's working, but this shouldn't have been the case:

In my case, I use Referrer Parameter instead of URL Parameter

If the parameter is in the URL of the page that hosts the form, that's a URL parameter. You said (or implied) you were linking directly from an email link to the form page. That wouldn't be the referrer.

Eben_Saputra
Level 3

That's my first intuition too, but when I test using URL Parameter, the form doesn't pass any value

But when I use Referral Parameter, I tried twice using different value, and it updates accordingly on the backend

SanfordWhiteman
Level 10 - Community Moderator

Doesn't make sense. Please provide the link to the page with the form.

Eben_Saputra
Level 3

Here is the landing Page

https://pages.lifemark.ca/TestSurvey.html

From the test email, I put some parameter at the end

https://pages.lifemark.ca/TestSurvey.html?SurveyScore=1

At the Landing page I use the following configuration

pastedImage_4.png

SanfordWhiteman
Level 10 - Community Moderator

Are you putting the form on an LP that is itself in an IFRAME?

Eben_Saputra
Level 3

You know, I am not quite sure, I just pick one of the custom template.

I'm guessing that has to do with the parameter acting weird?

SanfordWhiteman
Level 10 - Community Moderator

If you had an LP inside an LP then you would be forced to use the referrer. Normally this would not work, nor be necessary.

Eben_Saputra
Level 3

Ah I see, I will keep this in mind.

Because we won't use this landing page later on.

Regards,

Eben

Eben_Saputra
Level 3

Thanks as always Sanford!

I am going to try implementing the Parameter to the email.

As far as I know, I need only to put ?Field=value to the last part of my email
And at the form side, the auto-fill option will extract from that field name

Once I am successful I will report here

SanfordWhiteman
Level 10 - Community Moderator

You haven't explained how you're visualizing the "stars" in the first place. That is, there's no direct support for <input type=star-rating> on forms. You'd have to simulate it using radio buttons or a range with custom CSS.

So you might as well have the real stars count field (Score in Mkto presumably) be a hidden field mapped from the query param. The visible star widget mirrors that value.