SOLVED

Form "Not You?" functionality

Go to solution
Anonymous
Not applicable

Form "Not You?" functionality

Do any of you use "Not You?" buttons on forms (along side the Submit button)?

If so, how do you do this functionality?
Thanks!
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Rafael_Santoni1
Level 5

Re: Form "Not You?" functionality

This is how we implemented it.

We have a link in all our Marketo pages that asks the visitor to "click here" if the information on the form is not theirs to re-set the information. Once the person clicks on that, a javascript function we created clears the cookie and re-loads the page.

In addition to that, we check for a URL parameter (userID=guest). If any of our pages are called with that URL parameter present, we also clear the Marketo prefill and all the fields prior to rendering the page. We do that with a short JavaScript function. This allows us to link to any of our Marketo lead capture pages forcing not pre-filling the forms even for known leads if we wanted to.

Summary:
  1. Create a function that would clear the values, cookie, etc.
  2. Place link on your template to call the function to clear and reload the page.
Simple, non-intrusive, and easy to deploy and maintain.

If you wanted to apply the same functionality to the reset button on the form, you can use jQuery to "listen" to a click on the button and fire the same function or have it call the same page with the "magic" URL parameter.

Good luck!

Rafael

View solution in original post

25 REPLIES 25
Anonymous
Not applicable

Re: Form "Not You?" functionality

Subscribing to this thread. 😉
Alok_Ramsisaria
Level 10

Re: Form "Not You?" functionality

We are currently trying this for one of our clients. We are reading the Munchkin cookie and using the 'Not You' functionality for similar purpose. Hopefully, we will be able to share a detailed approach for this by coming week. 🙂
Rafael_Santoni1
Level 5

Re: Form "Not You?" functionality

This is how we implemented it.

We have a link in all our Marketo pages that asks the visitor to "click here" if the information on the form is not theirs to re-set the information. Once the person clicks on that, a javascript function we created clears the cookie and re-loads the page.

In addition to that, we check for a URL parameter (userID=guest). If any of our pages are called with that URL parameter present, we also clear the Marketo prefill and all the fields prior to rendering the page. We do that with a short JavaScript function. This allows us to link to any of our Marketo lead capture pages forcing not pre-filling the forms even for known leads if we wanted to.

Summary:
  1. Create a function that would clear the values, cookie, etc.
  2. Place link on your template to call the function to clear and reload the page.
Simple, non-intrusive, and easy to deploy and maintain.

If you wanted to apply the same functionality to the reset button on the form, you can use jQuery to "listen" to a click on the button and fire the same function or have it call the same page with the "magic" URL parameter.

Good luck!

Rafael

Anonymous
Not applicable

Re: Form "Not You?" functionality

Rafael
Would you be willing to share the JQuery code that you use for this functionality?


Thanks!
Adam 
Rafael_Santoni1
Level 5

Re: Form "Not You?" functionality

Sure thing. Let me put it together.
Rafael_Santoni1
Level 5

Re: Form "Not You?" functionality

This is what I do to make the "Clear" button reset the visitor properly

// Use jQuery via $jQ(...)
var $jQ = jQuery.noConflict();
 
$jQ(document).ready(function(){
 
// If Clear is clicked remove Marketo cookies, prefill, etc.
$jQ( "#mktFrmReset" ).click(function() {
 
$jQ("#_mkt_trk").val('');
        mktoPreFillFields = {};
        $jQ(".lpeRegForm")[0].reset();
        document.cookie = '_mkto_trk=NULL; expires=-1; path=/; domain=.citrix.com';
 
});
 
});

I have not tested this on pages with forms from the Forms 2.0 editor, only on pages with the original forms editor.
Anonymous
Not applicable

Re: Form "Not You?" functionality

Thanks much Rafael!
Rafael_Santoni1
Level 5

Re: Form "Not You?" functionality

No problem Adam. Any time.

BTW... this is how I do it with the URL parameter (if the URL has userId=guest):

	if(Mkto.getUrlParam("userId") == "guest"){
	        $jQ("#_mkt_trk").val('');
	        mktoPreFillFields = {};
	        $jQ(".lpeRegForm")[0].reset();
	        document.cookie = '_mkto_trk=NULL; expires=-1; path=/; domain=.citrix.com';
	    }



Anonymous
Not applicable

Re: Form "Not You?" functionality

Thanks again.  

I was just working on implementing this today and after playing around with a 2.0 form, I was able to get this working there as well.  The form name referenced in the reset should be ".mktoForm" instead of ".lpeRegForm".  

So this:
$jQ(".lpeRegForm")[0].reset();

Should become this:

$jQ(".mktoForm")[0].reset();

And everything should work.  

Thanks!
Adam