`action` attribute within forms getting ignored

Hey,

I’ve a form that looks like this

    <form name="subscribe" method="POST" action="/done.html" data-netlify="true">
        <input type="email" name="email" placeholder="Enter email">
        <button type="submit">
            Subscribe
        </button>
    </form>

But on submit, the browser gets redirected to /thanks instead of /done.html.

Could you please tell me what could be amiss here?

Thanks!

Hiya, sorry you are having trouble getting your forms to work.

This Common Issue is the first port of call to debug any forms issues.

If you are still having problems, please let us know, and we’ll take another look :slight_smile:

Hey Perry, thanks for the response.

After some debugging, I figured out that Netlify seems to be discarding the trailing .html from the value of the action attribute. Now that I know this, I can work around this issue.

But for future users, it’d be great if you could update/document this behaviour.

Thanks! :slight_smile:

glad it’s working now, @v1shnu! I’ll check with our documentation team to make sure this is expected behaviour.

Thanks for your patience - it turns out that is intended, even if not a well known feature. Sorry it tripped you up, and our documentation engineers are working on figuring out the right place to put that info into our docs.