Re: Managing email opt-in on subsequent form visits

Mark_Emond7
Level 3

Managing email opt-in on subsequent form visits

I am setting up a form for compliance with CASL. I don't want to continually have the email opt-in field unchecked on the form when someone who has previously expressly opted-in engages with another form.

Can anyone tell me if, on subsequent form visits, for a lead who has an email opt-in field value is true, will Marketo pre-fill the form by placing a check-mark in the opt-in box on the form (if Form Pre-fill is enabled of course).

If that's not the case, I think the best option is to use progressive profiling and place this question first in the progressive profiling list of fields, with a "Number of Blank Fields" is 1. I believe that should work. Please let me know if you don't think it will.

Thanks!

Mark

Tags (2)
12 REPLIES 12
Anonymous
Not applicable

Re: Managing email opt-in on subsequent form visits

Marketo "WILL" pre-fill the opt-in field value always upon form load. With that said I like the idea of using progressive profiling to hide this field after it is filled in by the visitor.

Mark_Emond7
Level 3

Re: Managing email opt-in on subsequent form visits

Thanks for validating that it will pre-fill the form on subsequent visits Mark!

Dan_Stevens_
Level 10 - Champion Alumni

Re: Managing email opt-in on subsequent form visits

Remember, form pre-fill does not work on forms that are embedded on non-Marketo LPs

SanfordWhiteman
Level 10 - Community Moderator

Re: Managing email opt-in on subsequent form visits

Remember, form pre-fill does not work on forms that are embedded on non-Marketo LPs

I'm going to go public with one of my (non-API, non-rate-limited) solutions for this soon on my blog. I think I've probably held out long enough.

SanfordWhiteman
Level 10 - Community Moderator

Re: Managing email opt-in on subsequent form visits

If that's not the case, I think the best option is to use progressive profiling and place this question first in the progressive profiling list of fields, with a "Number of Blank Fields" is 1. I believe that should work. Please let me know if you don't think it will.

Actually, this won't work.  Non-nullable boolean fields aren't a fit for ProgPro.

But there's no need to use ProgPro. A little Forms 2.0 JS will do it:

<script>

MktoForms2.whenReady(function(form){

  var formEl = form.getFormElem()[0],

      formRowEls = formEl.querySelectorAll('.mktoFormRow');

      Array.prototype.forEach.call(formRowEls,function(rowEl){

        if (rowEl.querySelector('#OptedIn[value="yes"]'))

          rowEl.style.display = 'none';

      });

}); 

</script>

Dan_Stevens_
Level 10 - Champion Alumni

Re: Managing email opt-in on subsequent form visits

Sandy, will this work for forms embedded on non-Marketo LPs as well?  If so, your solution would be more reliable than the one I just posted below.

SanfordWhiteman
Level 10 - Community Moderator

Re: Managing email opt-in on subsequent form visits

Sandy, will this work for forms embedded on non-Marketo LPs as well?

Not natively, since you have the Prefill problem.

But with one of my special sauces...

Dan_Stevens_
Level 10 - Champion Alumni

Re: Managing email opt-in on subsequent form visits

Here's how we do it.  When someone clicks the opt-in checkbox, we have a master smart campaign that processes all opt-in requests, as well as our double-opt-in process for Germany (where an email is then sent out to get a user to confirm their opt-in preference).  Within that campaign, we capture the date of the opt-in in a custom date field. 

pastedImage_0.png

Then for all subsequent visits, we use a visibility rule for the opt-in field within the form.  We include the opt-in date field as a hidden field (form pre-fill turned on).  If the date field does not contain a value, then we show the opt-in field.  The only issue is if you embed this form on a non-Marketo LP (since form pre-fill does not work).  And unfortunately, you can't use block field updates here since you're dealing with a boolean field (block field updates does not work for boolean fields).  Block field updates is preventing a checkbox from being checked (has never contained a value)

pastedImage_1.png

Anonymous
Not applicable

Re: Managing email opt-in on subsequent form visits

I love the idea of using a Marketo custom field to time stamp the data and make that become part of the meta-data associated withthe person.