When testing website locally, the form redirects you to the correct html page I have set, however when live, the form redirects to Netlify’s default page. I have tried changing the action to “/sent” “/sent.html” “sent.html” “sent” “/sent/” and “/sent/html/”. None of the variations fixed the issue.
My directory looks like this:
Here is my contact.html code
<div class ="contact">
<h2>Get in Touch</h2>
<p>Interested in receiving a personalized quote? Don't hesitate to reach out via phone call, text, or email to kickstart the journey toward your new website. We prioritize prompt responses and strive to get back to you swiftly, typically within the same day or by the following business day. We look forward to connecting with you and discussing your project in detail.</p>
<p><a href="#">lumina design co.</a></p>
<!-- <form action="https://email@example.com" method="POST"> -->
<!-- <input type="hidden" name="_subject" value="New Message from Lumina"> -->
<form name="contact" method="POST" data-netlify="true" onSubmit="submit"
<input name="bot-field" type="hidden">
<input type="email" name="email" placeholder="Email Address" required>
<input type="text" name="name" placeholder="Name" required>
<textarea name="message" placeholder="Write your message here." required></textarea>
My sent.html page is almost identical to the contact.html page, but I changed out the button text and input placeholder text, and removed the action from the form.
I had already gone through the documentation. I tried what you have suggested and it still is being sent to netlifys default message, however the URL ends in /sent. The sent page html looks almost identical to the contact page so I’m not sure what’s happening here.
form name=“contact” method=“POST” data-netlify=“true” data-netlify-honeypot=“bot-field” action=“/sent”
Hi @giannagoodpaster, thanks for the feedback.
Kindly make sure you have a sent.html file in your project root folder.
If you have verified your project root folder contains the sent.html file also make sure your current deploy is updated with the changes you made.
If the above does not work, kindly share a link to your repository is possible for me to help with the debugging.
@giannagoodpaster, you’ve a duplicate version of the form on the sent.html page. You cannot have 2 forms with the same name. If you either change the name of the form on that page OR add the action attribute to the form on sent.html too, it would work.