grabs the web page the form was filled out on, not overwritten on multiple form submissions | Community
Skip to main content
Kevin_Stinson
New Participant
January 22, 2021
Solved

grabs the web page the form was filled out on, not overwritten on multiple form submissions

  • January 22, 2021
  • 1 reply
  • 4499 views

Hello

I am having an issue where when a form is submitted it is not it does not overwrite the field when the form is filled out the second or third time. It always remains as the first submission.

 

I am using the LastFormURL added through addHiddenFields method that I read about on a nation post:

https://nation.marketo.com/t5/Knowledgebase/How-to-Create-a-Field-That-Grabs-the-Web-Page-the-Form-Was/ta-p/299289

 

Here is the code that I am using that is added on a non-Marketo page:

MktoForms2.loadForm("//pages.to.xxxxxx.com", "xxx-IAP-xxx", 3341, function(form) { form.addHiddenFields({ formLastURL : document.location.href }) });

 

The field formLastURL is set Block Updates From: None

 

Hoping for some insight to fix this.

 

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 SanfordWhiteman

Here are the 2 pages that the form and code are on:

https://www.franklintempleton.ca/en-ca/advisor/campaigns/refocus-review-rebuild

https://www.franklintempleton.ca/en-ca/advisor/products/mutual-funds/franklin-global-growth 


You can see in your F12 Console that the code isn't running, since it depends on the MktoForms2 object (created by forms2.min.js) and you aren't ensuring the correct load order.

 

1 reply

SanfordWhiteman
New Participant
January 22, 2021

Do you have Pre-Fill enabled for this field? (You shouldn't.)

Kevin_Stinson
New Participant
January 22, 2021

@sanfordwhiteman from what I read in the other posts is that the you did not need this form field on the actual form but it was added to the page in the .js script.

 

But I went and added it to the form as a hidden field and set it to Form Pre-fill: Disabled but I am still getting the original page that it was tested on and not the current page I am testing.

SanfordWhiteman
New Participant
January 22, 2021

You don't need it on the form in Form Editor, that's certainly true. But if it is on the form, you need to make sure the Pre-Fill is disabled.

 

What's the URL of a page w/this form?