Form occaisionally generating 404 page on submission

I’ve got a form that has 2 required fields (email and message) and 2 non-required fields (name and number). It submits fine when you only fill out the required fields, but when the non-required fields are submitted it generates a 404. I’m using wordpress if that’s of any relevance.

<form id="question" action="thankyou" method="post">
    <p class="question-label">Type your email address here...</p>
    <input id="email" name="email" type="text"></input>

    <h3>Your Question...</h3>
    <textarea id="message" name="message"></textarea>

    <input id="submit" name="submit" type="submit" value="GO" />

    <p>If you would like us to call you please enter you Name and Contact Number here:</p>

    <p class="question-label">Name</p>
    <input id="name" name="name" type="text"></input>

    <p class="question-label">Contact Number</p>
    <input id="number" name="number" type="text"></input>
</form>

Related posts

Leave a Reply

1 comment

  1. I believe it’s because you’re using a reserved keyword for the ‘name’ input. Try:

    <input id="enq-name" name="enq-name" type="text"></input>
    

    and it should fix your issue.