Dynamic Follow Up Page Help

Anonymous
Not applicable

Dynamic Follow Up Page Help

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>
Tags (1)
6 REPLIES 6
Anonymous
Not applicable

Re: Dynamic Follow Up Page Help

Have you tried including the Industry field along with the email field on subsequent forms?  It will be pre-populated with their first response and this may quickly solve your problem.
Anonymous
Not applicable

Re: Dynamic Follow Up Page Help

I thought of that as an option, but I'd really prefer for no extra fields to show up that aren't extremely necessary. I was hoping this field could stay hidden. 
Anonymous
Not applicable

Re: Dynamic Follow Up Page Help

I've tried searching some more and found that it might be futile.

Is there any javascript code that can read the name without it being submitted at that exact point?

Or one that reads the whole, im assuming, cookie, without requiring the submit button in general? 
Anonymous
Not applicable

Re: Dynamic Follow Up Page Help

I'm fairly certain there is because we have javascript that formats the phone number as the lead types it in.  Unfortunately, I'm not a JS expert, so you'll need to find one to help with this.
Anonymous
Not applicable

Re: Dynamic Follow Up Page Help

Fair play to Elliott, spotting the root cause: It is the JavaScript indeed.

returnURL and retURLhave been desupported by jQuery.
 
The updated function, more flexible and powerful is 
event.preventDefault(). Please share the information with your web dvelopers:

http://api.jquery.com/event.preventDefault/
Chandini_Kalsy
Level 2

Re: Dynamic Follow Up Page Help

Thanks for your inputs.

This is for BGomes. I am not a JS expert. How can we use event.preventDefault() instead of retURL in the code posted above?

We use dynamic follow-up based on form field value entered prior to submit. 

Would appreciate your help.

Regards,
Chandini