Allow tokens to pre-populate hidden form fields in Forms 2.0

Allow tokens to pre-populate hidden form fields in Forms 2.0

Rather than create additional smart campaigns/flows to accomodate this, it would be really useful if system tokens (or even a local token) can be used as the default value for a form field - often times these are hidden fields.  For example, when someone opts-in to receive future email communications from us, we need to date-stamp an "optin date" field with the time/date that this took place.  To be able to use the {{system.dateTime}} token as the default value would be very convenient.
14 Comments
Anonymous
Not applicable

Thanks, Grégoire Michel​!

Would much rather accomplish it this way and know once upon a time this didn't work.

Appreciate you doing the legwork to proof that out - I've now removed the extra javascript from our page and went with this cleaner implementation.

Cheers,

John

Grégoire_Miche2
Level 10

You are welcome

kh-lschutte
Community Manager
Status changed to: Open Ideas
 
Kenny_Elkington
Marketo Employee
Status changed to: Already have it

There are several options to do this on Marketo Landing Pages including Greg's great example here.  We have no plans to make this a feature available via form embed code.  You can set default values either static or dynamic with the Forms JS API  See the "Set Values on Hidden Fields on the Form" Example