I would like to pass 2 values from my CMS (Drupal) into 2 hidden fields within a Marketo form. Has anyone done this? Ideas?

Val_Vazquez4
Level 2

I would like to pass 2 values from my CMS (Drupal) into 2 hidden fields within a Marketo form. Has anyone done this? Ideas?

We have tried this by storing the values in JavaScript variables, removing the select menus, dynamically creating two new hidden input fields with the same IDs and Names as the select menus had, and passing the values from the JavaScript variables into the hidden fields.

 

We can view the HTML code prior to form submission and verify that the 2 fields have the correct names, IDs and are getting the correct values passed into them. But, for some reason, when the form submits, these two values, and only these two values are not being entered and stored in Marketo.

 

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: I would like to pass 2 values from my CMS (Drupal) into 2 hidden fields within a Marketo form. Has anyone done this? Ideas?

You should point to a page w/your code so I can tell if you're doing it right... using the Forms 2.0 JS API to set the hidden field values is all you need.