Hi,
We have a form that we want to use on multiple pages, but we want their thank you page to be dependent on the page their filling out the form on.
Can we populate a hidden field with the page url or name?
Solved! Go to Solution.
This has been asked before (make sure to search!) and is very easy:
MktoForms2.whenReady(function(form){
form.addHiddenFields({
'lastFormSubmitPageName' : document.title,
'lastFormSubmitPageURL' : document.location.href
});
});
Replace lastFormSubmitPageName and lastFormSubmitPageURL with the names of fields in your instance that you want to store this data.
Hi Mahurrinah Sims, You should be able to do this. Do you use a web personalization tool? Like Evergage or Optimizely?
Hi Amanda,
We use Optimizely.
There should be a workflow you can set up through optimizely> If fills our form 5678 on page x then show page x. That's how we handle this workflow through Evergage.
Also, you can actually do this with Javascript as well, might be easier. So on the form embed code, you can modify it to show a different landing page, then do this per page the form is on. I'm not sure what the exact script is, but google may have it? lol
This has been asked before (make sure to search!) and is very easy:
MktoForms2.whenReady(function(form){
form.addHiddenFields({
'lastFormSubmitPageName' : document.title,
'lastFormSubmitPageURL' : document.location.href
});
});
Replace lastFormSubmitPageName and lastFormSubmitPageURL with the names of fields in your instance that you want to store this data.