• Resolved pmterp

    (@pmterp)


    Hello,
    With the pro edition, is it possible to have the URL associated with the Submit button dependent on other field selections?
    We want to have the form on a landing page and depending on several selections made in the form, we want the URL to be altered.
    For example: if the user selects “Yes” for the question about “addon1”, we want “addon1” appended to the URL.

    • This topic was modified 6 years, 5 months ago by pmterp.
Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @pmterp,

    Not really, but you can redirect the users to a third page from the thank you page associated to the form based on the values submitted. I’ll try to describe the process with an example:

    Assuming the thank you page associated to your form is the:
    https://www.your-website.com/thank-you-page

    And there is a field (fieldname1) in the form whose possible values are: “Yes” or “No”, and finally you want to redirect the user to another webpage:

    https://www.your-website.com/thank-you-page-2/?parameter=addon1

    if the user selects the “Yes” value.

    In this case into the content of the orignal “thank-you-page” you can insert the shortcode for results as follows:

    
    [CP_CALCULATED_FIELDS_RESULT]
    <script>
    if('<%fieldname1_value%>' == 'Yes') document.location.href="https://www.your-website.com/thank-you-page-2/?parameter=addon1";
    </script>
    [/CP_CALCULATED_FIELDS_RESULT]
    

    And that’s all, if the user selects the “Yes” value it is redirected to the second page, passing the new parameter in its URL.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Using variables in the Submit button URL’ is closed to new replies.