MY BLOG

CREATE A PROPER FORM USING CONTACT FORM 7.

Creating a contact form on your WordPress site is essential to allowing your visitors to reach out to you. Contact Form 7 is one of the most popular and flexible plugins to achieve this. In this guide, I will show you how to easily create a working contact form in WordPress using Contact Form 7 with step-by-step instructions.
 

Step-by-Step Guide to Creating a Contact Form

 

Step 1: Install and Activate Contact Form 7

The first step is to install the Contact Form 7 plugin on your WordPress site:
  1. Log in to your WordPress dashboard.
  2. Navigate to Plugins > Add New.
  3. Search for “Contact Form 7” in the search bar.
  4. Click on Install Now and then Activate once the installation is complete.
 

Step 2: Create a New Form

Once the plugin is activated:
  1. Go to Contact > Add New in the WordPress dashboard.
  2. You will see a default form template already set up with basic fields such as name, email, and message.
  3. You can either keep this template as is or customize it by adding new fields like phone numbers, dropdown menus, or checkboxes.
  4. After making your changes, click Save to create the form.
 

Step 3: Configure Email Settings

To make sure form submissions are sent to your email:
  1. Under the form builder, find the Mail tab.
  2. In the To field, enter the email address where you want to receive submissions (this could be your admin email or another preferred address).
  3. Customize the email subject and message format to suit your needs.
  4. Save your changes.
 

Step 4: Add the Form to a Page or Post

To display the form on your website:
  1. After saving the form, a shortcode will be generated. This is a small piece of text used to insert the form into a page.
  2. Copy the shortcode.
  3. Go to the page or post where you want the form to appear, and paste the shortcode into the content area.
  4. Publish the page to make the form live on your website.
 

Step 5: Customize the Design (Optional)

You can make the contact form match your website’s design by customizing it through your WordPress theme’s styling options. Some themes allow you to easily change colors, font sizes, and layout without needing coding knowledge. <br/

Step 6: Test the Form

Before the form goes live for your visitors, test it:
  1. Visit the page where you added the form.
  2. Submit a test entry to check that everything works properly.
  3. Ensure you receive the form submission in your email inbox.
 

Additional Features

  • Spam Protection: Protect your form from spam by enabling Google reCAPTCHA or using anti-spam plugins like Honeypot, which add an invisible field to trick bots.
  • Custom Messages: You can customize the success and error messages that users see when they submit the form.

My suggestion:

      • To customize the style of the form using ELEMENTOR, It’s better to use Contact form 7 widget then select your form.
      That way, it’s easy to customize the style of the form.

Form Field width Adjustment CSS code:

HTML
				<style>
#field1, #field2 {
    width: calc(50% - 5px); /* Adjust width to account for margin */
    float: left;
    box-sizing: border-box;
    margin-right: 5px; /* Adjust the margin as needed */
}

#field2 {
    margin-right: 0; /* Remove margin from the second field to keep it aligned */
}
</style>
			

Form Field Structure:

HTML
				<label> School name [text* text-844]</label>

<label> Schooler name [text* text-845 id:field1 placeholder "First"]</label>

[text* text-846 id:field2 placeholder "Last"]

<label>Parents Name [text* text-847 id:field3 placeholder "First"]</label>

[text* text-848 id:field4 placeholder "Last"]

<label>Parent phone [tel* tel-645 placeholder "### ### ####"]</label>

<label>Parent email [email* email-824]</label>

<label>Preferred sport [text* text-850 placeholder]</label>

[submit "Submit"]