1,074 Views

Create a feedback form in your wordpress site using contact-form-7 plugin

Gathering user feedback is an important aspect for any business. Whether you are making a portfolio site, business site or a blog, user feedback is essential for you to know your customers.
In this tutorial we will learn to

  1. Create a feedback from
  2. Set to receive feedbacks in our email and
  3. Display the feedback form using shortcode

So let’s get started.
First thing you need to do is install contact-form-7 plugin. If you don’t know how to install the plugin visit this wonderful tutorial by WPbeginner folks.

1. Create feedback form

After installing and activating the plugin we will be able to see the Contact menu item in your sidemenu in the wordpress dashboard.
wp3_1.png
Click on the Contact menu and we can see the list of forms, one new form is already created for us as shown below.
wp3_2.png
Click on the contact form 1 to edit the form and change the title to Your Feedback
wp3_3.png
Then in the form tab of the editor paste the following code






[submit "Send"]

Let’s understand the code
Here Your Name (required) is the label that is displayed for the field.
Text is the field type. * means that the field can’t be left empty, without entering the data the form won’t proceed. If you want the field to be empty then you may omit it. and your-name is the field name.

2. Set to receive feedbacks in our email

Lets setup the form so that we receive user posted feedbacks in our email. In the same page, goto the mail tab
wp3_4.png
In the To field edit and put your email address. Everything else you can leave as it is.
Now, whenever a user submits this form, we will be able to receive the users feedback on the email we set in the To field.
After the changes are done, save the form.

3. Display the feedback form using shortcode

To display we use the shortcodes. Shortcode for our recent form is shown just below it’s title
wp3_5.png
Create a page called feedback and in the content paste the given shortcode
[contact-form-7 id="233" title="Your Feedback"]
The Id might be different but it does not matter.
Understanding the shortcode
Here, contact-form-7 is the shortcode that tells wordpress which shortcode function to load and others are attribute that tells the contact-form-7 plugin how to format the contact form. The id attirbute selects which form to display, each form will have unique id. The title=”Your Feedback” is the title that was given.

Related Posts

%d bloggers like this: