SOLVED

Solving for Locked/Unlocked Content on a form fill

Go to solution
Tiffany_Tasa2
Level 1

Solving for Locked/Unlocked Content on a form fill

We are currently trying to solve for how we can have a Marketo form work to redirect a known visitor who has submitted a previous form on an OD event page, to the same follow up page, but with the content unlocked (as it's a week long online event).

 

The idea is that once someone has already registered for the event, they do not have to keep re-registering to access the previously locked content on that hosted follow up page. Working with my web team, we were hoping to have something like this happen based on what we've been able to make work so far:

 

  1. User views the registration or ty page, and if it's a known visitor they'll actually be shown a secondary version (we'll call this the unlock form) of the main registration form (we'll call this the reg form) just asking for their email address, with a secondary "I still need to register" link option on the bottom. That link actually takes them to the normal reg form / reg page. (we've solved for this part with the email form being called on in the "if known visitor, show: custom HTML" portion of the reg form… so a form within a form, essentially).
  2. If user has previously registered, they submit their email address which takes them to the unlocked version of the content page.
  3. If they have not registered, they submit their email and get redirected to the main reg form with a note there that says essentially “nope, not found, register here, etc.” (message handled by our web team, not the form)
  4. The idea is the unlock form contains an email field and a plain text field that gets populated via form prefill with either a hidden field value (cookied or default value) assigned on the reg form when the original registration gets submitted, or even a workflow that assigns the field value upon original submission. Open to whatever here. We are using Optimizely to hide that plain text field to the person submitting. And when submitted, Marketo does this on the backend under the redirect settings:
    1. If 'text field' is 'registered', redirects them to /url/register-ty/ 
    2. Default redirects them to /url/registration-not-found/
  5. The website code has a listener function for when the Marketo form is filled out. When the form is successful submitted, it will look for whether the redirect url has "register-ty" or ‘registration-not-found”, and unlock the content if the former.

 

The issue I’m having is that I cannot get the form prefill function to work and that assigned value set at registration to populate, therefore I can’t get the redirect on the backend to happen.

 

We use the ‘form within a form’ set up with our progressive profiling process all over our site and it works fine. But for whatever reason the value will not pull up in this scenario.

 

Any suggestions would be appreciated if you’ve solved for something like this!

Cheers,
Tiffany Tasa
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Solving for Locked/Unlocked Content on a form fill


As far as the code goes to set the cookie, I'd have to find that out. I know we use standard munchkin, but I'm not familiar with race conditions. I thought / was hoping it would be as simple as assigning the hidden field value on the registration form, and then adding that test field on the email form with the "Form Pre-fill" enabled. I've figured out pretty quickly that this is all outside of my basic forms and webpage skill set. 🙂 


You can't use Marketo's native Pre-Fill in this scenario. 

 

You can set a standard cookie (nothing to do with Munchkin tracking, just a regular old browser cookie) and then have a Hidden field that Auto-Fills from that cookie value. Setting the cookie is a one-liner that any web dev can do. There isn't any more code necessary than that, the rest is in Form Editor where you set the Hidden field properties.

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Solving for Locked/Unlocked Content on a form fill

Let's hone in on the one you're having a problem with.

 

What's a page that has the Unlocked version?

 

What's the actual name of the form field that is set to AutoFill from a cookie (not Pre-Fill, that's a different feature)?

 

What's code you're using to set the cookie? Does it have a race condition?

Tiffany_Tasa2
Level 1

Re: Solving for Locked/Unlocked Content on a form fill

Hi Sanford,

 

Thank you for your reply.

 

The page with the content hasn't been finished yet, so I've just been trying to work on getting the redirect to work. I created just a generic Craft page to use the '-ty' url to test the redirect in general (I can send you the actual url if you need it). I haven't even gotten to the locked vs unlocked yet, as that part would be set up by the web team.

 

The field is just a test string field that a teammate created that I repurposed to test this process with. It's not used anywhere in our instance right now. I did try this earlier with a generic text field also with no luck. The one I am currently using is called 'Grisell Test.'

 

As far as the code goes to set the cookie, I'd have to find that out. I know we use standard munchkin, but I'm not familiar with race conditions. I thought / was hoping it would be as simple as assigning the hidden field value on the registration form, and then adding that test field on the email form with the "Form Pre-fill" enabled. I've figured out pretty quickly that this is all outside of my basic forms and webpage skill set. 🙂 

 

I hope that is somewhat helpful. My boss just messaged me that she can't figure it out either and our web guy may have to come in and just do some special coding somewhere. 

Cheers,
Tiffany Tasa
SanfordWhiteman
Level 10 - Community Moderator

Re: Solving for Locked/Unlocked Content on a form fill


As far as the code goes to set the cookie, I'd have to find that out. I know we use standard munchkin, but I'm not familiar with race conditions. I thought / was hoping it would be as simple as assigning the hidden field value on the registration form, and then adding that test field on the email form with the "Form Pre-fill" enabled. I've figured out pretty quickly that this is all outside of my basic forms and webpage skill set. 🙂 


You can't use Marketo's native Pre-Fill in this scenario. 

 

You can set a standard cookie (nothing to do with Munchkin tracking, just a regular old browser cookie) and then have a Hidden field that Auto-Fills from that cookie value. Setting the cookie is a one-liner that any web dev can do. There isn't any more code necessary than that, the rest is in Form Editor where you set the Hidden field properties.

Tiffany_Tasa2
Level 1

Re: Solving for Locked/Unlocked Content on a form fill

Thank you, Sanford! We'll give that a try.

Cheers,
Tiffany Tasa