controlpanel.systems - How do I add and use WordPress contact forms? Print

  • 0

There are various WordPress form plugins out there, such as WP Forms, Contact Form 7 and Pirate Forms.

 

In this example, we'll demonstrate with the free to use Contact Form 7 plugin.

 

Install the Contact Form 7 Plugin

Log in to your WordPress Admin area, head to Plugins and select Add New. Search for Contact Form 7 and select Install Now and then Activate.

 

Add a New Contact Form

You’ll now see a new menu option called Contact down the left-hand WordPress sidebar. Select Contact to configure a new form. You’ll see a list of current contact forms, with a default form called 'Contact form 1' already added.

 

We’ll create a new one. Select Add New. You'll see the default form that's been added along with its default data.

 

Configuring Your Form

Form tags are placeholders for a HTML form control. For example, you can add a drop-down menu using the drop-down menu tag. You can see our example below and how it affects the form on the site.

Field type - This sets whether the field being added is required to submit the form.

Name - This is the name of the form tag being added. It's only used internally, so it won't affect how the form field is displayed on the website.

 

Options - As this is a drop-down menu tag, there needs to be various options for the user to select. In our example we've used various ages.

 

Id attribute/Class attribute - If you want to customize your form further, you can assign a CSS ID or Class attribute.

 

Edit the Mail Settings

Now you've configured your form, you'll want to configure where the form actually sends from, and where it sends to. The From address will always need to be an address that uses your own domain, e.g. example@yourDomain.com, but you can set the To address to be any email address you want to receive the form to.

 

You can configure what information from the form gets sent via the email. In the example above, you can see the tags: [your-name], [your-email], [your-subject] and [your-message]. This will be the information the user entered into the form when they submitted it.

 

Adding the Form To Your Site

Now you've configured the form, you can add it to a Post or Page on your WordPress site. To do this, you'll need the form shortcode provided on the Contact Form page.

In our example, our short code is:

[contact-form-7 id=“11” title=“New Contact Form”]

 

Add the shortcode.

Once done, your form will display on the page or post you've added it-to.


Was this answer helpful?

« Back