Exercise: Creating a page with contact form

No matter what kind of website you pick, it will definitely have a contact us page with a contact form.

And when it comes to WordPress, the most sensible way to build out a contact form or any other kind of form is with the help of a plugin like a Contact Form 7 or Gravity Forms.

You can still craft your own custom contact form with your PHP skills. But, according to my experience, you don’t really get that much of time to build something from scratch. Also, it is not at all a good idea to re-invent the wheel unless your version is better.

Plus, it is WordPress. The Client expects a screen in the admin panel to edit the form or create a new form for a different need. If you are creating a form by yourself, it is a lot of work, right?

So, no matter in which direction you think, it is always sensible to go with existing WordPress Form plugins.

Anyway, here is the exercise:

  1. Install Contact Form 7 or Ninja Forms plugin
  2. Create a contact form with some fields like Name, Email, and message
  3. Create a page and put the shortcode of the newly created form in it. Every form based WordPress plugin will provide shortcodes for individual forms.
  4. Create a custom template to render this newly created page. The custom template shouldn’t output the featured image even if it is set.

That’s all for this module.

Leave a Comment