ZACK BRADY

The Case of a Bad WordPress Form: Getting 404 on Submit

Tweet

So I spend most of my days in WordPress. Today, I was presented with an interesting error that caused me quick panic. A form I had made for a client’s contact page was bringing me to a 404 error on submit.

 

I was baffled. Why would this be happening? I had made plenty of forms in WordPress in the past? What was different?

 

A quick google search brought me to this thread on the WordPress.org forum.

 

My problem?

 

When I typically make a from I tend to name my fields like so “ftname” rather than just “name”. I do this for security reasons (so obviously I’ve never actually used “ftname” to name a field in the past but you get the idea).

 

What I found was that this kind of naming also helps to prevent errors in wordpress.

 

This specific form was made originally by one of my partners quickly and then handed over to me. He had named a field “name”.

 

Now for unknown reasons WordPress doesn’t like this.

 

And that’s it, to prevent errors (and to help boast your security) be sure to be creative with how you name form elements.


Discussions, Web Design and Development, Web Tutorials, Wordpress
wplogoblue-stacked-rgb