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!
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