• Resolved pulseprojects

    (@pulseprojects)


    Can you confirm that with the pro version it is possible to create nested conditional redirects – I need to be able to setup something like the following.

    If SELECT A OPTION 1 selected and SELECT B option 2 selected redirect to A

    If SELECT A OPTION 1selected and SELECT B option 3 selected redirect to B

    IfSELECT A OPTION 2 selected and SELECT B option 2 selected redirect to C

    and so on.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    You don’t need the pro plugin for this, but you do need to write a bit of custom code. Please see: https://conditional-fields-cf7.bdwm.be/conditional-redirect/

    This is a rather simple example, but you can make the logic as complex as you like, since deciding where to redirect can be done with pure javascript.

    Plugin Author Jules Colle

    (@jules-colle)

    Here’s a slightly more complex example that might be closer to what you are looking for:

    What's your favorite Site? [radio url "Site 1" "Site 2" "Site 3" ]
    Redirect there? [radio redirect use_label_element "yes" "no"]

    [group url1]You will be redirected to example.com/url1[group]
    [group url2]You will be redirected to example.com/url2[group]
    [group url3]You will be redirected to example.com/url3[group]

    [submit]

    <script>
    document.addEventListener( 'wpcf7mailsent', function( event ) {
    if(jQuery('[data-id="url1"]').is(':visible')) {
    location = 'https://example.com/url1'
    }
    if(jQuery('[data-id="url2"]').is(':visible')) {
    location = 'https://example.com/url2'
    }
    if(jQuery('[data-id="url3"]').is(':visible')) {
    location = 'https://example.com/url3'
    }
    }, false );
    </script>

    Conditions:

    show [url1] if [redirect] equals "yes"
    and if [url] equals "Site 1"
    show [url2] if [redirect] equals "yes"
    and if [url] equals "Site 2"
    show [url3] if [redirect] equals "yes"
    and if [url] equals "Site 3"

    Working example: https://conditional-fields-cf7.bdwm.be/form-tester/?hash=e2e5ff0290299a1de0f1be6cdaaa6474

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.