Contact Form Plugin Not Working. (Plugin Development)

May 15, 2018

Hey Developer,

Before this blog ran on WordPress, It was a very small website with a contact page. The contact page was just 1 file called contact.php. Of course in WP, you can either implement a contact form as part of the theme or as a plugin, with plugin being the preferred choice. I found a very good article on how to implement such plugin here.

However, as most developers, I wasn’t happy just copying and pasting the code, so I decided to modify it. As part of my modifications I modified the name of the input element to “name” like so:

<input type="text" name="name">

Then everything broke, and I could not figure out what happened for hours. WordPress has a list of reserved keywords that you cannot use, one of which is name. The rest you can see here. As a new WP developer reserved keywords was the last thing I thought about. Hopefully this can save some of you guys a lot of frustration.