Netlify Forms: Custom success message with action parameter

Hello there :slight_smile:

I have read all the posts previously posted here and I am still having a problem with my Form redirecting it to my “Thank you” page, here is my form code

<form name="contact" method="POST" data-netlify="true" class="php-email-form" action="/thankyou.html" netlify-honeypot="bot-field">:

<form name="contact" method="POST" data-netlify="true" class="php-email-form" action="/thankyou.html" netlify-honeypot="bot-field">
                <div class="form-group">
                  <input type="text" name="name" class="formcontrol" id="name" placeholder="Your Name" data-rule="minlen:4" data-msg="Please enter at least 4 chars" />
                  <div class="validate"></div>
                </div>
                <div class="form-group mt-3">
                  <input type="email" class="form-control" name="email" id="email" placeholder="Your Email" data-rule="email" data-msg="Please enter a valid email" />
                  <div class="validate"></div>
                </div>
                <div class="form-group mt-3">
                  <input type="text" class="form-control" name="subject" id="subject" placeholder="Subject" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" />

                  <div class="validate"></div>

                </div>

                <div class="form-group mt-3">

                  <textarea class="form-control" name="message" rows="5" data-rule="required" data-msg="Please write something for us" placeholder="Message"></textarea>

                  <div class="validate"></div>

                </div>          
               <div class="text-center"><button type="submit">Send Message</button></div>
              </form> 

I want to redirect my form to “Thankyou.html” which is: https://acr.netlify.app/thankyou.html
Please help, I already read all the previous posts!!

any reason why that line of code is duplicate? that is likely to cause prolems.

No, actually I wrote it 2 times.
But it is just one line in my code.

Any idea where is the problem??

I am struggling for this, I believe that my code is right, but it is not re-direct me to the Thank-you page!!

omas123, you need to have syntactically correct html in order for the forms to work properly.

it is not “just” a duplicate line - in fact, having more than one form with the same name can cause all kinds of problems, and that is ultimately what is happening here.

Can you correct your html and try again?

<div class="form">
          <form name="contact" method="POST" data-netlify="true" class="php-email-form" action="/thankyou.html" netlify-honeypot="bot-field">
            <div class="form-group">
              <input type="text" name="name" class="form-control" id="name" placeholder="Your Name" data-rule="minlen:4" data-msg="Please enter at least 4 chars" />
              <div class="validate"></div>
            </div>
            <div class="form-group mt-3">
              <input type="email" class="form-control" name="email" id="email" placeholder="Your Email" data-rule="email" data-msg="Please enter a valid email" />
              <div class="validate"></div>
            </div>
            <div class="form-group mt-3">
              <input type="text" class="form-control" name="subject" id="subject" placeholder="Subject" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" />
              <div class="validate"></div>
            </div>
            <div class="form-group mt-3">
              <textarea class="form-control" name="message" rows="5" data-rule="required" data-msg="Please write something for us" placeholder="Message"></textarea>
              <div class="validate"></div>
            </div>
            
           <div class="text-center"><button type="submit">Send Message</button></div>
          </form>
        </div>

This is my code agian, I am only using one form

Hey @OMAS123,
Hmmm… quite a mystery. I just created a test submission and it went through successfully but I see that I was not then redirected to the thank you page :face_with_monocle:

Looking at the network calls, it seems like you have a validate.js script with a function called php_email_form_submit(this_form, action, data) that may be interfering with how we handle the POST to our backend. Is there a way for you to disable that on your form?