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>
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.
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
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?