GDPR: Opt-in with dynamic hidden fields? | Community
Skip to main content
Julia_Campbell2
Level 2
April 23, 2018
Question

GDPR: Opt-in with dynamic hidden fields?

  • April 23, 2018
  • 1 reply
  • 1787 views

Hi folks,

In prepping for GDPR, I'm wondering if there's a way to create dynamic hidden fields on forms that will populate if certain values are entered. For example, I have a Date/Time field in Marketo to track phone opt ins. We are adding legal language on forms that will mean that if someone gives us their phone number, they are opting in to Sales outreach. If the phone number on the form is populated and the Phone Opt In Date field is not populated yet, I want it to populate with the day and time of the form fillout (e.g. NOW() ).

Is it possible to have a hidden field on a form that operates with IF(field on form filled out), THEN(populate hidden field with date/time)?

Thank you for your help!

Cheers,

Julia

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
April 23, 2018

Yes, this absolutely possible using the Forms JS API (namely, the addHiddenFields method in the onSubmit event).

However, for this particular need (and if you're not/don't have a developer) you'll probably find it easier to use a Change Data Value flow step, with the new value

     {{system.datetime}}