3 Replies Latest reply on Aug 31, 2017 11:13 AM by Sanford Whiteman

    Redirect to a new form if user selects country value in a drop down

    Andréia Repsold de Souza

      Does anyone know if I can redirect a user to a different form through a form completion?  I have a dropdown value countries and If the contact select one specific country in the form, I would like to redirect them to the form of the language selected. I know I have to create different form for each language. But, how can I have this process done where Marketo captures the value of the country and redirect automatically to a "language" different form?

       

      Thanks for your help.

       

      Andreia

        • Re: Redirect to a new form if user selects country value in a drop down
          Akshay Pant

          Hi Andréia Repsold de Souza,

           

          Yes, we can achieve by using segmentation. We need to create the segmentation based on the country. We will put the form dynamically according to the country language in each segment. We would implement a simple drop down on the landing page with multiple languages values. When user select the particular languages, the links present in the drop down values with the segmentation name, will redirect to the user to the specific form.

           

          Regards,

          Akshay

          • Re: Redirect to a new form if user selects country value in a drop down
            Sanford Whiteman

            Sure, a barebones implementation is like so:

             

            [1] Create a segmentation by language:

             

             

            Note you do not have to sort people into segments ahead of time. In fact, you can't segment a new lead in time to use their segment in a follow-up page. But that's totally fine, as we're using runtime segmentation which doesn't use their database record.

             

            [2] Create an LP with a named Form element that's dynamic + segmented based on language.

             

            [3] A placeholder form with a <select> where they can choose their language:

             

            Note this form will not generate Filled Out Form activities. We're just using it as an interstitial form to direct based on their language choice.

             

            [4] Couple of lines of Forms JS:

             

            MktoForms2.whenReady(function(form){
              form.onSubmit(function(form){
                form.submittable(false);
                document.location.href = 'https://mySegmentedLP.example.com/?PreferredLanguage=' + form.getValues()['PreferredLanguage'];
              });
            });
            

             

            This code stops the form from completely submitting (thus why you don't see a Filled Out Form) but captures the language value, then redirects to the variant of the LP (in [2] above) that shows their language.