Support » Fixing WordPress » Form Action Always Shows 404 Template

  • Resolved jtrost


    I have a form on my homepage whose action is the homepage, like this:

    <form name=”myform” action=”/” method=”post”>

    When I submit the form it shows the 404.php template. I have tried changing the form action to a page and disabling permalinks, and I always get the 404 page after submitting the form. I have also enabled debugging in wp-config.php, but it shows no errors.

    It seems like no matter what I do submitting this form always shows the 404 page. Any ideas what is wrong here?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Kathryn


    You’ll need to check the instructions for your form script and make sure you’ve set up your thank-you page and form action correctly. It’s difficult to assist further without knowing the specifics of your form script configuration.

    That’s the thing. The form action is the index page. All the form does is refresh the page with some post data.

    So if I type in “” I see my index page. However, when I have the form action as “” it shows a 404 error.

    Moderator Kathryn


    Are you using a plug-in for your form or a separate script? Which?

    No plugin. It’s just straight HTML. Here it is:

    <form action="/" name="bid-form" method="post" id="bid-form">
    <h3>Bid: <input type="text" id="the-bid" name="the-bid" /> <input type="submit" value="Place Bid" /></h3>

    [Please post code snippets between backticks or use the code button.]

    I just solved my own problem.

    Turns out the name of the input field was the same name as a custom post type. So even though I am using post data, WordPress thought I was trying to access a post, not pass user input.

    Moderator Kathryn


    Awesome. Thanks for posting the fix.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Form Action Always Shows 404 Template’ is closed to new replies.