Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Make a Contact Form with Contact Form 7

Contact Form 7 lets visitors send you messages from your site. This guide shows how to build a form and show it on a page.

WordPress2 min read20 steps6 screenshots

What is Contact Form 7?

Contact Form 7 is a free plugin. A plugin is an add-on that gives WordPress new features. This one makes simple forms. A visitor types a name, an email and a message. WordPress then emails it to you.

Step 1: Install the plugin

  1. Log in to your WordPress dashboard.
  2. Go to Plugins, then Add New Plugin.
  3. Search for Contact Form 7.
  4. Click Install Now, then Activate.
    install-contact-form-7-plugin

Step 2: Open your first form

  1. Click Contact in the left menu.
  2. Click Contact Forms.
  3. You will see a sample form called "Contact form 1". Click its name to edit it.

Step 3: Edit the form

On the Form tab you will see code like this:

<label> Your name
    [text* your-name] </label>

<label> Your email
    [email* your-email] </label>

<label> Subject
    [text* your-subject] </label>

<label> Your message (optional)
    [textarea your-message] </label>

[submit "Submit"]

Each word in square brackets is a field. The star means the field is required. You can change the labels. You can also remove fields you do not need.

Step 4: Set up the email

  1. Click the Mail tab.
  2. In the To box, type the address where you want messages sent.
    create-a-new-contact-form-7
  3. In the From box, use an address on your own domain. This helps stop emails landing in spam.
  4. Leave the Subject and Message body as they are, or change them.
  5. Click Save.

Step 5: Add the form to a page

  1. At the top of the form page, copy the shortcode. It looks like [contact-form-7 id="123" title="Contact form 1"]. A shortcode is a small tag that WordPress swaps for a feature.
  2. Go to Pages, then Add New Page.
  3. Give it a title, like "Contact Us".
  4. Add a Shortcode block and paste the code in. Or paste it in the text area if you use the classic editor.
    shortcode-contact-form
  5. Click Publish.

Step 6: Test it

  1. Open the page.
  2. Fill in the form and click Submit.
  3. Check your inbox and your spam folder.

Stop spam

Contact Form 7 supports tools like reCAPTCHA and Akismet. Look under Contact, then Integration to set them up.

recaptcha-contact-form-7
wordpress-contact-form-7-integration-page
Tip: If mail does not arrive, try an SMTP plugin, which sends mail through a real mailbox. Need help? Open a ticket at https://secure.hostvento.com/submitticket.php.

Quick recap

  • Install and activate Contact Form 7.
    redirect-users-after-submission
  • Edit the form and set the Mail tab.
  • Copy the shortcode into a page and publish.
  • Test the form and add spam protection.