Building Custom Forms in WordPress

Whether sent via email or stored in a database, for login, or a subscription to a newsletter, a form is an essential part of every website. For anyone just learning HTML, forms are where it starts to get tricky and PHP without forms wouldn’t be much of a language. The trouble with forms isn’t that they are inherently complicated. Their biggest problem is that they require a lot of grunt-work and are fiddly to boot. There is front-end validation to consider as well as data sanitisation and a poorly constructed form can open a site to all sorts of vulnerabilities. Luckily WordPress has a number of plugins to deal with just about any sort of form possible.

Form solutions in WordPress

As with any form it is important to assess what fields are needed. This is particularly true when dealing with WordPress form plugins. There are several well-known possibilities for form building in WordPress. The main difference between them is their pricing model.

Gravity formsGravity Forms is a paid plugin that gives you all the add-ons with the initial purchase which is $199.00 USD for developers license covering a year of support and updates. Gravity Forms is probably the most popular forms plugins and not without reason. It is well documented and is probably the easiest way to implement advanced forms.


Ninja FormsNinja Forms is an up and coming forms plugin that is relatively well documented and easy to extend. It follows the freemium pricing model meaning that there is a free version of the plugin (in the WordPress plugin repository and on Github) with paid add-ons. Although there are bundles available these add-ons can be quite costly. The developer bundle is $305.00 USD for 8 extensions on unlimited sites at the time of this writing, so it’s important to plan ahead to determine what is needed. I can attest to the developer friendliness of this plugin and they were very quick to respond to my questions despite my not having purchased any of the extensions.


Contact Form 7No list of WordPress form plugins would be complete without mention of Contact Form-7. This plugin has been around since 2007, is one of the most downloaded plugins in the WordPress repository and continues to be updated on a regular basis. It does have documentation and is completely free. While perhaps not the ideal choice for elaborate forms and payment gateways, it is one of the easiest to use contact form solutions and can be quite flexible.

Read more…