How to get generic netfily thank-you page when form is submitted on my website

I know this may be a simple fix but I just want to know what to put in my action or method attributes in my form to get this. I gave up on trying to get my custom page issues resolved and just want this simple fix done asap. Please help if possible.

this is my current code… I know I have to get rid of mail.php so you can ignore that, but is there anything I need to put instead?

I should also mention the form submits successfully its just the success message I’m having issues with

                                <!-- Start Contact Form Box -->
                                <div class="contact-form-box">
                                    <form id="contact-form" class="default-form contact-form" action="mail.php" method="post" data-netlify="true">
                                        <div class="row mb-n6">
                                            <div class="col-xl-6 mb-6">
                                                <div class="default-form-group">
                                                    <input name="name" type="text" placeholder="Name" required>
                                                </div>
                                            </div>
                                            <div class="col-xl-6 mb-6">
                                                <div class="default-form-group">
                                                    <input name="email" type="email" placeholder="Email" required>
                                                </div>
                                            </div>
                                            <div class="col-xl-6 mb-6">
                                                <div class="default-form-group">
                                                    <input name="phone" type="tel" placeholder="Phone" required>
                                                </div>
                                            </div>
                                            <div class="col-xl-6 mb-6">
                                                <div class="default-form-group">
                                                    <input name="subject" type="text" placeholder="Subject" required>
                                                </div>
                                            </div>
                                            <div class="col-xl-12 mb-6">
                                                <div class="default-form-group">
                                                    <textarea name="message" placeholder="Comment" required></textarea>
                                                </div>
                                            </div>
                                            <div class="col-12 mb-6">
                                                <div class="default-form-group tex-center">
                                                    <button type="submit" class="btn btn-lg btn-outline-one">Submit Message</button>
                                                </div>
                                            </div>
                                            <p class="form-messege"></p>
                                        </div>
                                    </form>
                                </div>
                                <!-- End Contact Form Box -->```

@savvYazzy Setting your own custom success page is explained in the documentation here:

So…

  1. Make a page at whatever location you would like, for example /contact-success
  2. Change the form action from mail.php to the path of that page, action="/contact-success"

as I just mentioned in my original post. I don’t want a custom page just the generic thank you page from netfily. I did not ask for support for a custom one.

i just want to know what I need to remove or add in my existing form to make the generic thank you page possible. thanks

That’s fine, but do you still have the action="mail.php" in your code?

Because if you do, you’re telling Netlify to navigate there.

Remove the action.


There’s also no need to get snitchy either, as I’m just a community member and trying to help.
You aren’t owed support and there’s nothing preventing you from reading the documentation and understanding it yourself.

Thanks, I’ll try that.

I believe you misread my tone as I was just trying to clarify what I was looking for. I have no reason no be ‘snitchy’ on a support form. I did read the documentation and didn’t find my answers which is why I resorted to starting a topic, which I’ve seen many others start but didn’t see a clear solution… thanks anyway

removing the action did not work. it now is just blank

Can you clarify what you mean by “it now is just blank”?

What specifically is blank? The action tag, or the page that it is redirecting to?

Are you able to provide a link to your test page?

This is a duplicate (or continuation) of:

1 Like