Skip to content

Instantly share code, notes, and snippets.

@RobertCam
Last active November 2, 2017 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertCam/3b3de761d3887b4ea92b36468bbea1a7 to your computer and use it in GitHub Desktop.
Save RobertCam/3b3de761d3887b4ea92b36468bbea1a7 to your computer and use it in GitHub Desktop.
Add this script to the FCD in Unbounce to complete the dynamic form set up
<script>
/*
Unbounce Community :: Tips & Scripts :: Dynamic Form Confirmation URL's Using Browser Redirects
TS:0002-04-051
***********************
Do not remove this section. It helps our team track useage of external workarounds.
*/
function getURLParameter(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""]) [1].replace(/\+/g, '%20'))||null
}
var url = getURLParameter('destination');
if (url != null) {
setTimeout(function() {
window.top.location.href = 'http://'+url+window.location.search;
}, 1000); // Edit the amount of time the FCD shows ex. 1000 = 1 second
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment