Custom Contact Forms Redux
In 2009-2010 Custom Contact Forms was one of the first WordPress plugins I wrote. The purpose of the plugin was to solve a simple problem: easy contact form building on the web.
As I was building the plugin, WordPress 3.0 had not yet been released, and therefore custom post types and other useful API’s did not yet exist. I wrote the plugin the best I could using custom database tables (ouch!). The plugin become decently popular. I continued development on the plugin for the next year or so. In the process I learned a lot about writing code for WordPress. Also in the process I landed a job at 10up where I learned (and continue to learn) more than I ever thought I would.
Years later in 2015, here I am an experienced WordPress developer and an avid open source contributor. I have used most of the popular WordPress form plugins: Gravity Forms, Ninja Forms, Formidable, etc. Using all these plugins, despite lots of great functionality, have left me with the nagging feeling that something is missing.
Within the post edit screen, a simple “Add Form” button next to the “Add Media” button brings up the form manager modal:
Within the form management modal, you can also see your existing forms and edit them if you choose:
After inserting a form into a post, you see a nice preview within TinyMCE:
While the meat of the plugin lies within the form manager, single form views exist. Within a single form view you can see a live form preview:
Also within the single form view lives the form submissions table. You can easily paginate through results and add/remove columns as you please:
The plugin includes the new JSON REST API for WordPress. Right now, it is included as a Composer dependency for various reasons until the API is added to WordPress core.
Note: While the plugin is suitable for production environments, version 6 is still somewhat in beta. Please let me know on Github if you experience any problems.