How to create a form in WordPress

 What is a form?

They have been used for many years to enter data and send important information from one place to another. Specifically, contact forms are an integral part of most websites, as it is the main way visitors have to communicate with the webmaster.

Forms are the kind of elements that every website sooner or later needs to use, since it is the only possible way to send structured information and store it correctly on a web page.


How to create a custom forms in WordPress??

To create a custom form, you will need to install it using a plugin. In our case we will use the Contact Form 7.

This plugin allows you to create simple forms to receive information from visitors to your site.

How contact works 7?

Once you have installed the plugin, you will see that a new section appears in your administration panel called Contact. In this section you can create as many forms as you wish, each with their respective fields and response texts.

Each time someone completes your form, your data will be sent in an email to the address you specify, and with the format you want. This way you can be notified every time someone wants to contact you .





Creating your first form

The forms in Contact form 7 are created by means of a combination of own labels of the plugin, which serve to insert the different fields of the form and indicate the values ​​that they must have. The syntax of these labels is usually the following:

[text * field-name 30/50 “Enter Your Name”]

this code will create a text field with the following values:

  • text: Indicates that it is a text field.
  • Asterisk (*): Makes the field mandatory and can not be empty.
  • field-name: Is the reference name of the field, and must be unique.
  • 30/50: Indicates the size of the field (30), and the maximum number of characters (50).
  • “Enter Your Name”: Is the text shown when the field is empty.

the vast majority of these attributes is optional, so a more simplified field might look like this:

[text* camp-name]







Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.