6 Replies Latest reply on Jan 12, 2018 4:40 PM by Sanford Whiteman

    Single Form - Many Thank You Pages

    Alex Peterson

      Hello,

       

      I'm wondering how other people do this. I'd like to have a single form for asset downloads that routes to a thank you page related to the asset (planning to use a token for the download link, related assets, page name, etc). Is this possible with Forms 2.0?

       

       

       

        • Re: Single Form - Many Thank You Pages
          Trevor Parsell

          Hey Alex,

           

          Will this form be on a single landing page or on different pages? If it is on multiple landing pages, you choose a different thank you page within the form area of the landing page where the form is hosted. Also, you cab route to different landing pages based on rules set using the Add Choice/Advanced Thank you Page functionality within the form settings.

           

           

          1 of 1 people found this helpful
            • Re: Single Form - Many Thank You Pages
              Alex Peterson

              Thanks Trevor. The form will be on multiple landing pages, but we are running LPs on Adobe AEM. It looks like the TY page setting based on address should work. Thank you.

              • Re: Single Form - Many Thank You Pages
                Alex Peterson

                Oh I was thinking address was the URL, but this is just referencing the form fields? Is there a way to choose a TY page based on URL?

                  • Re: Single Form - Many Thank You Pages
                    Trevor Parsell

                    Hey Alex,

                     

                    Another option would be to use a querystring for each landing page to identify which thank-you page people should receive. The form could then capture the unique value for each page and route to the appropriate thank-you page.

                     

                    Example:

                    ---Links with query strings---

                    www.landingpage.com/lp1?lp=1

                    www.landingpage.com/lp2?lp=2

                    www.landingpage.com/lp3?lp=3

                     

                    ---Form settings---

                    Autofill a hidden field with the query string value

                    Route to appropriate landing page based on that value

                     

                    Thanks!

                      • Re: Single Form - Many Thank You Pages
                        Sanford Whiteman

                        This is very easy in JS.

                         

                        If you have a consistent naming convention so the Thank You URL, for example, is always the path to the current page, plus the string "_ty", under the domain pages.example.com then:

                         

                        MktoForms2.whenReady(function(form)
                          form.onSuccess(function(vals){
                            var thankYouURL = document.createElement('a');
                        
                            thankYouURL.href = document.location.href;
                            thankYouURL.hostname = "pages.example.com";
                            thankYouURL.pathname += "_ty";
                        
                            document.location = thankYouURL;
                            return false;
                          });
                        });
                        

                         

                        If the Thank You URL is based on fields from the form, in this example an assetDownload field:

                         

                        MktoForms2.whenReady(function(form)
                          form.onSuccess(function(vals){
                            var thankYouURL = document.createElement('a');
                        
                            thankYouURL.href = "http://pages.example.com/globalthankyou.html";
                            thankYouURL.search = "asset=" + vals.assetDownload;
                        
                            document.location = thankYouURL;
                            return false;
                          });
                        });
                        

                         

                        Naturally an infinite number of configurations are possible. I try to stay away from choices in Form Editor unless the choices are completely unrelated to form content.