I have a problem with getting a dynamic follow up page to work.
I have the follow up page changing dynamically based on the industry of the individual filling out the form, and have tested it and have it working on one page but not on another.
I also use progressive profiling, where after the initial form fill, the only thing we ask for is email. With the industry having already been asked and identified on the first go around, it's no longer on the form as a selectable item.
When the Industry field is no longer a selectable item, the code I've used doesn't seem to detect it (from the initial fill) and therefore doesn't lead the user to the correct follow up page.
Can anyone help me getting this page to work?
I've included the code here:
<script type="text/javascript" src="/js/public/jquery-latest.min.js"></script>
<script type="text/javascript" language="Javascript">
var $jQ = jQuery.noConflict();
function changeFollowupURL(){
// first, set the default follow up page
var URL = 'http://www.info.accellion.com/DynamicThankYou.html';
// override the default based on form values
// Replace this with your own rules for setting the new URL
switch ($jQ("#Industry").attr("value")) {
case "Legal":
URL = 'http://www.info.accellion.com/DynamicLegalSample.html';
break;
case "Advertising/Mktg":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "AEC":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Consumer Products/Retail":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Education":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Financial Services":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Government (Federal)":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Government (State/Local)":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Healthcare":
URL = 'http://www.info.accellion.com/DynamicLegalSample.html';
break;
case "Industrial/Manf":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Leisure":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Not for Profit":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Other":
URL = 'http://www.info.accellion.com/DynamicThankYou.html';
break;
case "Pharma/Biotech/Medical Devices":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Printing/Publishing":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Real Estate":
URL = 'http://www.info.accellion.com/Sample.html';
break;
case "Technology":
URL = 'http://www.info.accellion.com/Sample.html';
break;
}
// set the new follow up page
$jQ("input[name='returnURL']").attr('value',URL);
$jQ("input[name='retURL']").attr('value',URL);
return true;
}
// catch when a form is submitted, change the followup URL
function formSubmit(elt) {
changeFollowupURL();
return Mkto.formSubmit(elt);
}
</script>