SOLVED

Re: Opt-In Checkbox on Form

Go to solution
ElliottAntal
Level 2

Opt-In Checkbox on Form

Hi - This is in response to this thread from 4 years ago: https://nation.marketo.com/t5/Product-Discussions/Opt-in-field-checkbox-on-Form/m-p/220321/highlight...

I liked the idea of having the Opt-In checkbox & language not appear for Known People who have already Opted In. Unfortunately Marketo Support made it seem as if I couldn't set it up as described in the post. It was my intension to "listen" for a specific field (Opt-In) for a Known Person and based on the outcome it would trigger the visibility rules for the opt-in checkbox and language on the form. The field to "listen" for a value was going to be hidden but it sounds like it has to be visible.

"If I am reading this correctly, the Opt-In checkbox has to be visible at all times to accept the autofill value and trigger the visibility rule for the Opt-In language? 
It was my understanding that I couldn't pull in a known person field data into a hidden field to dictate my visibility rule, in this case my hidden field was "opt-in date" based on your suggestion."

 

Has anyone else successfully executed a dynamic opt-in checkbox and language like this?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Opt-In Checkbox on Form


  • I see that the recent change to Marketo Form Pre-Fill will only work from an Email Click with the proper mkt_tok. Ideally I was hoping for any known person visiting the website but that doesn't look to be the case anymore?

Correct, you would have to use my Pre-Fill JS (used by many large sites)... search past posts for lots of links to it.

 


Knowing I need the mkt_tok to properly test a form, I made the field visible and sent myself a test email. I clicked through to the Marketo Landing Page and Form but unfortunately the field wasn't pre-filled. Curious if you had any ideas.

Make sure Pre-Fill is enabled at all 3 levels — globally (in Admin), LP level, and form level.

View solution in original post

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: Opt-In Checkbox on Form

You can certainly have a Hidden field trigger Visibility Rules.

 

A field cannot trigger its own visibility using built-in VRs, but it can trigger other fields' visibility.

ElliottAntal
Level 2

Re: Opt-In Checkbox on Form

Right now my setup (based on the thread from 4 years ago) is as follows. I have a hidden field looking for a visitors Opt-In DateTime field:

 

mkto_Opt-In DateTime: Hidden: "null"
- Form Pre-Fill: Enabled


Then I have a Visibility Rule tied to the outcome of what was found in the visitors Opt-In DateTime field:

mkto_Opt-In (Checkbox)

- Visibility Rules: Hide (mkto_Opt-In) if (mkto_Opt-In DateTime) is not empty

 

I have a feeling I missed a step somewhere. When I talked to Support they made it seem as if my setup wouldn't work in theory because (mkto_Opt-In DateTime) would need to be visible to collect the Opt-In DateTime data in order to trigger my Visibility Rule.

SanfordWhiteman
Level 10 - Community Moderator

Re: Opt-In Checkbox on Form

Having a Checkbox type field be visible only if a Hidden type field is empty is no problem.

 

In the VRs, would express it as "Show Field A if Field B is empty" as opposed to "Hide Field A if Field B is not empty."

 

You also need to make sure Pre-Fill is working as you test — set Field B to Text (as opposed to Hidden) temporarily.

ElliottAntal
Level 2

Re: Opt-In Checkbox on Form

This is great advice. A few questions:

  • I see that the recent change to Marketo Form Pre-Fill will only work from an Email Click with the proper mkt_tok. Ideally I was hoping for any known person visiting the website but that doesn't look to be the case anymore?
  • Knowing I need the mkt_tok to properly test a form, I made the field visible and sent myself a test email. I clicked through to the Marketo Landing Page and Form but unfortunately the field wasn't pre-filled. Curious if you had any ideas.
SanfordWhiteman
Level 10 - Community Moderator

Re: Opt-In Checkbox on Form


  • I see that the recent change to Marketo Form Pre-Fill will only work from an Email Click with the proper mkt_tok. Ideally I was hoping for any known person visiting the website but that doesn't look to be the case anymore?

Correct, you would have to use my Pre-Fill JS (used by many large sites)... search past posts for lots of links to it.

 


Knowing I need the mkt_tok to properly test a form, I made the field visible and sent myself a test email. I clicked through to the Marketo Landing Page and Form but unfortunately the field wasn't pre-filled. Curious if you had any ideas.

Make sure Pre-Fill is enabled at all 3 levels — globally (in Admin), LP level, and form level.

ElliottAntal
Level 2

Re: Opt-In Checkbox on Form

Oh great! Is this something I need to add to every form (Marketo LP hosted & Wordpress hosted) or is there a global location I can add this? I can go in and edit the code for my Marketo LP & forms but I'll need to let my website design agency know where to add this for the forms already hosted on our Wordpress site.