Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save PardotGists/d8a04e201d8056dddfb2 to your computer and use it in GitHub Desktop.
Save PardotGists/d8a04e201d8056dddfb2 to your computer and use it in GitHub Desktop.
Using Form Field-Based Completion Actions additional required field example
<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