Last active
August 16, 2016 17:35
-
-
Save PardotGists/d8a04e201d8056dddfb2 to your computer and use it in GitHub Desktop.
Using Form Field-Based Completion Actions additional required field example
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 type="text/javascript"> | |
var email = encodeURIComponent('%%email{js}%%') | |
switch('%%your_field_id{js}%%') | |
{ | |
case 'VALUE_1': document.write('<iframe src="FORM_HANDLER_1_URL?email=' + email + '&your_required_field1=%%your_required_field1%%&your_required_field2=%%your_required_field2%%" height="1px" width="1px" />'); | |
break; | |
case 'VALUE_2': document.write('<iframe src="FORM_HANDLER_2_URL?email=' + email + '&your_required_field1=%%your_required_field1%%&your_required_field2=%%your_required_field2%%" height="1px" width="1px" />'); | |
break; | |
} | |
</script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment