Knowledgebase

How to add a contact form to WordPress with Contact Form 7

A contact form lets visitors send you a message without showing your email address to spammers. This guide shows you how to add a contact form to WordPress with the free Contact Form 7 plugin: edit the form, set where the messages are sent, and put the form on your Contact page.

First install and activate Contact Form 7 from Plugins → Add New Plugin: How to install, activate and delete WordPress plugins.

1) Open Contact Forms

After activation a new Contact menu appears (1). It already contains a ready form called Contact form 1 (3). Click it to edit it, or click Add Contact Form (2) to create a new one.

Contact menu, Add Contact Form and the default form

2) The Form tab

Give the form a clear title (1). The Form tab contains the form template (4): each field is a tag in square brackets, for example [email* your-email] (the * means required). Use the buttons above it (3) to add more fields such as phone (tel), a drop-down menu or a file upload.

Form tab: title, field buttons and form template

3) The Mail tab: where messages go

Open the Mail tab (1):

  • To (2): the email address that receives the messages, for example info@yourdomain.com.
  • From (3): keep an address on your own domain, such as [_site_title] <wordpress@yourdomain.com>. Do not put the visitor's email here; that is the most common reason messages land in spam.
  • Subject (4): for example New website message: [your-subject].
  • Additional headers (5): Reply-To: [your-email] lets you reply directly to the visitor.

Mail tab: To, From, Subject and Additional headers

Click Save. At the top of the page you will find the form's shortcode, something like [contact-form-7 id="..." title="..."] (click Toggle shortcode if it is hidden). Copy it.

4) Put the form on a page

Create or edit your Contact page: How to create a page. Write the title (1), add a Shortcode block (type /shortcode) and paste the shortcode (2), then click Publish (3).

Shortcode block on the Contact page

The form now appears on your website (1). Send yourself a test message and check that it arrives.

The contact form on the website

Common problems

  • Messages do not arrive or go to spam → use a From address on your domain, check SPF/DKIM for your domain (Why does my email go to spam? SPF, DKIM and DMARC), and check that the To mailbox exists.
  • "There was an error trying to send your message" → the server could not send the email; contact support with the time of the test.
  • Lots of spam submissions → add a CAPTCHA from Contact → Integration (for example Cloudflare Turnstile or reCAPTCHA) or a quiz field.

Frequently asked questions

Can the form send a copy to the visitor?

Yes. In the Mail tab tick Use Mail (2) and set its To field to [your-email].

Can I have different forms for sales and support?

Yes. Create a form for each, set a different To address, and place each shortcode on its page.

Need help? Open a support ticket or message us on WhatsApp +20 127 113 3655.

  • WordPress, Contact Form 7, forms

Was this answer helpful?

0 Users Found This Useful