Preventing a Form from Overwriting Recent Record | Community
Skip to main content
New Participant
November 14, 2016
Solved

Preventing a Form from Overwriting Recent Record

  • November 14, 2016
  • 2 replies
  • 3759 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Dayna_Wellman3

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>

2 replies

Dayna_Wellman3
Dayna_Wellman3Accepted solution
New Participant
November 14, 2016

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>

Dayna WellmanCampaign Operations Consultant &#64; Etumos
Nav_SinghAuthor
New Participant
November 14, 2016
SanfordWhiteman
New Participant
November 14, 2016

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.

Nav_SinghAuthor
New Participant
November 14, 2016

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

NS