Viewing 1 replies (of 1 total)
  • kazuyk

    (@kazuyk)

    This may be one of the solutions for you.

    1. Insert hidden field tag into your forms:
    form 1: [hidden redirect-url "/thank-you-1"]
    form 2: [hidden redirect-url "/thank-you-2"]

    2. Load the following script on the pages that contain contact form:

    document.addEventListener( 'wpcf7mailsent', function( event ) {
      var inputs = event.detail.inputs;
      for ( var i = 0; i < inputs.length; i++ ) {
        if ( 'redirect-url' == inputs[i].name ) {
          location = inputs[i].value;
          break;
        }
      }
    }, false );
Viewing 1 replies (of 1 total)
  • The topic ‘Redirecting to a separate thank you page’ is closed to new replies.