Hi Greg - the js that Sanford provided is to just keep the "other" field in sync with the opt-in field. It's not a replacement for the process I've illustrated here. And like I mentioned above, this process only works (using functionality within the UI) with Marketo LPs, not forms embedded on our website. It would be interesting to see the full js code to accomplish this with embedded forms (hiding the field if the field is not empty; or if opt-in date exists) - vs. having to use a smart campaign to keep the values persistent.
There are 2 issues, in fact.
A full-fledged embedded PreFill solution will certainly fix this.
But also consider one quirk about Marketo checkbox fields: if a checkbox is in your Progressive Profiling section, it will always be shown until it is checked. ProgPro logic does not support "intentionally left blank" fields; they are considered the same as unfilled fields.
So if you're willing to have that checkbox be counted in your ProgPro max fields (or if you're not otherwise using ProgPro at all) this is another way to conditionally show a field w/this particular datatype.
So, I love the discussions! But I want to make sure that I'm reading this correctly since for my purposes, this may fix everything. Since this is a progressive form (embedded on our site), the field will show up no matter what as long as it remains unchecked? We don't have any other checkbox type fields on our progressive forms, so I didn't know that was how those work. That may make my life a lot easier since it will always appear at the top. I understand that cookies and other items can cause it to reappear later, but for those that have filled out a lot of our forms, that field won't show up once they have checked it the first time? And until they check it, it will always show up?
the field will show up no matter what as long as it remains unchecked?
Correct. Outside of the Progressive Profiling block, checkbox fields (in Marketo-land forms, not on standard HTML forms) can have the 2 values "yes" or "no." But in the ProgPro block, "no" is considered empty. So as long as the Boolean field remains false on the server, that field will always be shown on the form.
Amber Hobson and Sanford,
I applied Progressive Profiling to our opt-in checkbox so once someone opts in (checks the box), they won't see the checkbox anymore and that has worked as expected. Thanks for the insight.
I have run into one snag though—I was testing to see if after opting in (checking the checkbox) and then unsubscribing the checkbox would reappear. That did not happen, which makes sense because the checkbox value and the unsubscribe are different. So here's my question:
In your opinion, which is the better option:
I appreciate any help you can provide in thinking through this.
I like this idea of using the Opt-in date as a controller for the opt-in field visibility, BTW. If you sync the Unsubscribe field with the Opt-in one, you can also use the Unsubscribe field as a controller.
If I am reading this correctly... you overwrite the opt in program with latest program even though the checkbox value was hidden (opt in date exist)? Wouldn't you want to have the original opt in program tracked even though someone fills out multiple forms, or am I missing something?
Yulia - if a value exists, we do not overwrite this (we block field updates). We also have another field called "Last Opt-in program", which does get updated if future opt-in consent is given.