Using a campaign specific token in a hidden field on a multi-use form | Community
Skip to main content
May 25, 2017
Question

Using a campaign specific token in a hidden field on a multi-use form

  • May 25, 2017
  • 1 reply
  • 3485 views

Hello all,

I did some research before I decided to post this as I was not able to find an appropriate solution.

Here is our use case:

- We would like to build one form with a hidden field that we would like to populate with a token {{my.parameter}}

- We would then want to use that form in many future Marketo Hosted Landing pages tied to corresponding trigger campaign

    Each program specific to different projects.  We would want to just replicate the programs and update the {{my.parameter}} token value each time instead of having to duplicate the form each time. 

Is this scenario possible to pass a value through the token {{my.parameter}} into the hidden field and captured each time the form is submitted.

I don't think I can do this with the answer provided in this thread:  token in fields possible?

thanks for your help.

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

1 reply

SanfordWhiteman
Level 10
May 25, 2017

If the LPs are program-local assets, then you can use the {{my.token}} to set the hidden field. Doesn't matter if the form is global.

MktoForms2.whenReady(function(form){

  form.addHiddenFields({

    fieldName: "{{my.token}}"

  });

});

May 26, 2017

Thank you Sanford!  I will give this a try and confirm.

regards,

Nghi