6 Replies Latest reply on Nov 25, 2013 11:23 AM by Chandini Kalsy

    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
            
                // 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":
                 break;
               case "Advertising/Mktg":
                 break;
             case "AEC":
                 break;
               case "Consumer Products/Retail":
                 break;
             case "Education":
                 break;
               case "Financial Services":
                 break;
             case "Government (Federal)":
                 break;
               case "Government (State/Local)":
                 break;
               case "Healthcare":
                 break;
               case "Industrial/Manf":
                 break;
             case "Leisure":
                 break;
               case "Not for Profit":
                 break;
             case "Other":
                 break;
               case "Pharma/Biotech/Medical Devices":
                 break;
             case "Printing/Publishing":
                 break;
               case "Real Estate":
                 break;
               case "Technology":
                 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>