Last active
November 2, 2017 17:24
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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