SOLVED

Preventing a Form from Overwriting Recent Record

Go to solution
Highlighted
Level 2

Preventing a Form from Overwriting Recent Record

So I was trying to set-up a form for our Channel team to use to gauge 'pre-pipeline' one of the constraints they requested was that the form should not require an email address, at a bare minimum it should capture partner information and also Channel rep details. I'm running into trouble and curious if anyone has addressed this in the past. I believe the browser cookie is resulting in the previous record continuing to be updated vs. creating a brand new record for subsequent form fills so company names continue to be overwritten as the form is refilled. I've prevented pre-fill data in the forms so looking for any tips on how to prevent this from occurring. Does anyone know how to force the form to create a new record on each fill?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level 3 - Champion Alumni

Re: Preventing a Form from Overwriting Recent Record

Hi Navtej,

We ran into the same problem and Corey Bethel​ was able to build Java Script code that clears the values after submission of the form so there's no tracking. We just add this as an HTML element to the landing page. This should be fine to use as-is without any editing, but Corey can correct me if I'm wrong. Hope this helps!

<script>

//add a callback to the first ready form on the page

MktoForms2.whenReady( function(form){

  //add the tracking field to be submitted

        form.addHiddenFields({"_mkt_trk":""});

        //clear the value during the onSubmit event to prevent tracking association

  form.onSubmit( function(form){

  form.vals({"_mkt_trk":""});

  })

})

</script>

View solution in original post

7 REPLIES 7
Highlighted
Level 10 - Community Moderator

Re: Preventing a Form from Overwriting Recent Record

Question should be in Products, not Marketing Central.

What you're actually creating is a "referral form." Search the Community for that term and you'll see a lot of pointers.

Highlighted
Level 2

Re: Preventing a Form from Overwriting Recent Record

Thanks Sanford. Found it pretty quickly after altering my search terms to that.

NS

Highlighted
Level 3 - Champion Alumni

Re: Preventing a Form from Overwriting Recent Record

Hi Navtej,

We ran into the same problem and Corey Bethel​ was able to build Java Script code that clears the values after submission of the form so there's no tracking. We just add this as an HTML element to the landing page. This should be fine to use as-is without any editing, but Corey can correct me if I'm wrong. Hope this helps!

<script>

//add a callback to the first ready form on the page

MktoForms2.whenReady( function(form){

  //add the tracking field to be submitted

        form.addHiddenFields({"_mkt_trk":""});

        //clear the value during the onSubmit event to prevent tracking association

  form.onSubmit( function(form){

  form.vals({"_mkt_trk":""});

  })

})

</script>

View solution in original post

Highlighted
Level 2

Re: Preventing a Form from Overwriting Recent Record

Highlighted
Anonymous
Not applicable

Re: Preventing a Form from Overwriting Recent Record

I know this is an older post, but does the script also work with embedded Marketo Forms on landing page builders like Unbounce?

Highlighted
Level 10 - Community Moderator

Re: Preventing a Form from Overwriting Recent Record

If you're using an embedded Forms 2.0 form on Unbounce, yes, it'll work fine.

If you're using the integration you and I worked on the other month, no. In that case you simply remove the _mkt_trk field from the form.

Highlighted
Anonymous
Not applicable

Re: Preventing a Form from Overwriting Recent Record

You're the best Sanford. Yes, using Forms 2.0 on this one, and your other integration method has been perfect.