How to create a contact form in WordPress: Step-by-step guide

Reading time approx.: 10 minutes

A contact form allows visitors to your WordPress website to send you a message directly through the site. Typical fields are name, email address, subject, and message. Depending on the intended use, additional fields can be added.

WordPress itself does not include a complete contact form builder. For a classic contact form, a plugin is therefore usually used. In this guide, we use Contact Form 7 as an example. The plugin has been widely used for many years and can also be used for simple contact forms with just a few fields.

Briefly explained: First, install a form plugin, create your contact form within it, enter the desired recipient address, and then insert the finished form onto a WordPress page. After that, be sure to send a test message yourself.

What does a simple contact form need? #

For a standard contact form, a few fields are often enough:

  • Name
  • Email address
  • Subject
  • Message
  • Submit button

Which details are actually needed depends on the purpose of the form. A general contact form usually requires less information than, for example, a support, quote, or booking request.

Recommendation: Only request information that you actually need to process the request. A clear and concise form is usually more pleasant for visitors than a form with numerous unnecessary mandatory fields.

Install contact form plugin #

For this guide, we use Contact Form 7.

First, log into the WordPress admin area and open:

Plugins → Add New Plugin

Search there for:

Contact Form 7

Make sure to select the correct plugin. Install it and then activate it.

After activation, an additional menu item for managing the contact forms appears in the WordPress admin area.

Create new contact form #

Open the section for in the WordPress admin area Contact or rather the contact forms.

Depending on the plugin version and the language of your WordPress installation, individual labels may vary slightly.

You can edit an existing standard form or create a new one.

Assign a unique internal name, for example:

Contact form main page

This name is not automatically displayed as a heading on your website. It mainly helps you to distinguish between multiple forms later on.

Define form fields #

Contact Form 7 works with so-called form tags. These are used to define the individual input fields.

A simple form can contain fields for the following information, for example:

  • Sender's name
  • Email address
  • Subject
  • Message

In addition, the form requires a submit button.

Use mandatory fields wisely #

Certain fields can be defined as mandatory fields. This means that the form cannot be submitted unless these fields have been correctly filled out.

For a simple contact form, a valid email address and the actual message are often particularly useful.

However, you shouldn't automatically make every field a mandatory field.

Practical Tip: The more mandatory fields a contact form has, the more effort it takes for the visitor. Therefore, limit mandatory information to details that are truly necessary for a meaningful processing of the inquiry.

Set the recipient's email address #

A crucial part of the configuration is located in the email settings of the form.

This specifies the address to which WordPress should send the form message.

Check the field for the recipient in particular. Use an email address that you actually have access to and through which you want to process the requests.

For example, an address like this could be used:

kontakt@deine-domain.ch

Configure sender address correctly #

Besides the recipient address, the sender configuration is also important.

A common mistake is to use the email address entered by the visitor directly as the technical sender of the message.

This can cause problems with modern mail servers and their security checks because WordPress, for example, then tries to send a message with a foreign domain as the sender via its own server.

It is usually more sensible to use a sender address from your own website domain, for example:

wordpress@deine-domain.ch

or:

kontakt@deine-domain.ch

The email address entered by the visitor can be used for the reply-to address instead.

Important: The visitor's email address and the technical sender address of the form are not the same. A clean sender configuration can be crucial to ensure that form messages are processed correctly by receiving mail servers.

What is the reply-to address? #

The Reply-To address determines which address a reply is sent to when you click in your email program on Answers you click.

This allows the message to be technically sent from an address on your own domain, while your reply still goes directly to the visitor.

This is an important distinction in contact forms:

  • From: technical sender address of your website
  • To: Address where you want to receive the request
  • Reply-To: Visitor's email address

Set subject of form email #

The subject of the incoming message can also be configured.

A clear subject line helps you quickly identify contact form messages in your inbox later.

For example:

New inquiry via the website

If the form contains a subject field, its content can also be included in the email subject depending on the configuration.

Configure email message content #

In the email section, you also define which form fields appear in the delivered message.

Adding a new field to the form later does not necessarily mean its content will automatically appear everywhere you want it in the email.

Therefore, always check the email configuration after making changes to the form.

Save contact form #

After checking the form and email settings, you save the contact form.

The form already exists in WordPress, but it is not yet automatically displayed on a publicly visible page.

In the next step, it must be integrated at the desired location.

Insert contact form on a WordPress page #

Open the page where the form should appear, for example your contact page.

Depending on the editor and plugin used, different options are available for integration.

Contact Form 7 provides its own WordPress block for created forms. In the block editor, select the corresponding Contact Form 7 block and then choose the desired form.

Alternatively, depending on the working method or environment used, a shortcode provided by the plugin can also be used.

What is a shortcode? #

A shortcode is a short WordPress instruction in square brackets. WordPress or a plugin replaces this placeholder with the corresponding content upon output.

In the case of form plugins, a shortcode can, for example, ensure that the previously created contact form is output at this location.

The specific shortcode is generated by the plugin and should not be made up.

Publish or update contact page #

After inserting the form, you save or update the page.

Then open them in the frontend of your website and check the display.

Pay special attention to:

  • Field labels
  • Required fields
  • Spacers
  • Width of the input fields
  • Message field
  • Submit button
  • Display on smartphones

Be sure to test the contact form yourself #

A form is not fully set up just because it looks correct on the website.

Always perform a complete functional test after setup.

  1. Open the contact page like a normal visitor.
  2. Enter a test name.
  3. Use an email address you have access to.
  4. Write a distinct test message.
  5. Submit the form.
  6. Check the confirmation on the website.
  7. Then check the inbox of the stored recipient address.
  8. Check the spam folder if necessary.
  9. Reply to the message as a test and check the Reply-To address.

Practical Tip: Do not just test if any email arrives. Also check the sender, reply address, subject line, and content of the message. Only then will you know if the form is configured completely correctly.

Form shows „Successfully sent“, but no email is received #

This is a typical WordPress issue and does not automatically mean that the form itself is faulty.

Form plugin and email transmission are two different levels.

The form can successfully submit the request to WordPress, while the email generated from it is not delivered later.

Possible causes include, for example:

  • incorrect recipient address
  • incorrect sender configuration
  • Recipient's spam filter
  • Problems with the PHP mail function
  • missing or unsuitable SMTP configuration
  • Authentication issues when sending emails

Therefore, check the form and email settings first before completely recreating the form.

Why SMTP can be useful for WordPress #

WordPress uses its mail function by default for sending emails. However, whether a message was technically handed over to the mail environment does not reliably indicate whether it will actually end up in the recipient's inbox later.

An SMTP plugin can configure WordPress to send messages via a defined mail server or a supported delivery service.

Depending on the configuration, this also facilitates authentication and troubleshooting when sending emails.

In CURIAWEB this is available for GoSMTP PRO available. Depending on the facility, this can be used to access shipping logs and other diagnostic options, among other things.

Important: SMTP is not a guarantee that every message will be delivered. DNS configuration, sender reputation, spam filters, and the rules of the receiving mail server can also affect delivery.

Contact form only works for some senders #

If messages from certain visitors arrive and others do not, you should check the exact form and mail configuration.

Once again, the distinction between the visitor's email address and the technical sender address of your website is particularly important.

Do not blindly use arbitrary visitor addresses as the technical sender.

Contact form and spam #

Publicly accessible contact forms can be found by automated bots and abused for spam messages.

Therefore, after the basic functional test, a new form should also be reviewed with regard to spam protection.

Possible procedures include, for example:

  • Honeypot techniques
  • CAPTCHA procedure
  • reCAPTCHA
  • Cloudflare Turnstile
  • internal spam filter plugin
  • external anti-spam services

Which solution makes sense depends on the form plugin used, the volume of spam, and the website's data protection requirements.

Observe data privacy for contact forms #

Personal data is transmitted via a contact form. This may include, for example, name, email address, telephone number, IP-related technical data, or the content of a message.

Therefore, a contact form should not be viewed in isolation.

Check among other things:

  • which data are actually collected
  • where this data is processed or stored
  • whether the form contacts external services
  • whether a CAPTCHA or anti-spam service transmits data to third parties
  • whether information about the form is required in the privacy policy
  • how long transmitted data is retained

Note: The technical setup of a contact form does not replace a legal review of the website. Which data protection information or consents are required depends on the specific use and the integrated services.

Does a contact form need a privacy policy checkbox? #

Whether an explicit checkbox or consent is required for a specific form cannot be answered from within WordPress alone.

This depends, among other things, on the purpose of the processing, the data collected, integrated services, and the respective legal basis.

A checkbox should therefore not be included merely because it is present on other websites. Likewise, it should not be omitted without review.

For legal questions, you should seek expert advice.

Only use file uploads if they are really needed #

Many form plugins also allow file uploads.

However, file uploading increases complexity and can introduce additional security and privacy concerns.

If you need uploads, you should check file types, maximum file size, storage, and access options, among other things.

For a simple contact form, a file upload is usually not required.

Do not expand form fields unnecessarily #

It is technically simple to keep adding more fields. However, that does not automatically make a form better.

Ask yourself for every field:

  • Do I really need this information?
  • Must it already be present at the first contact?
  • Is this field mandatory?
  • Can I ask for the information later?

Especially with general contact forms, a short and clear structure is often the better solution.

Test form on smartphones #

Many visitors use contact forms on smartphones.

Therefore, check the contact page on smaller screen sizes as well.

Pay special attention to:

  • Fields must not extend beyond the screen
  • labels are easy to read
  • the submit button is easy to use
  • Keep error messages visible
  • no other website elements cover the form

Check forms after plugin or theme updates #

A contact form that has been set up should not be left unchecked for years.

After major changes to WordPress, the theme, the form plugin, the SMTP configuration, or security systems, a new functional test is advisable.

Even independently of updates, it is advisable to occasionally test business-critical forms yourself.

Typical mistakes in WordPress contact forms #

  • Create forms, but never test them yourself
  • enter an incorrect recipient address
  • Use visitor address unverified as technical sender
  • misconfigure Reply-To
  • do not include new form fields in the email output
  • Do not check the spam folder in case of delivery issues
  • Test form on desktop only
  • require an unnecessarily large number of mandatory fields
  • Completely ignore spam protection
  • integrating external CAPTCHA services without a data privacy review
  • assume that a success message automatically confirms email delivery

Checklist for a new contact form #

  1. Install and activate form plugin.
  2. Create contact form.
  3. Add only necessary fields.
  4. Define mandatory fields logically.
  5. Check recipient address.
  6. Configure technical sender address correctly.
  7. Check Reply-To address.
  8. Check email content.
  9. Insert the form on the desired page.
  10. Check page in frontend.
  11. Send test message.
  12. Check inbox and spam folder.
  13. Test reply function.
  14. Check the mobile display.
  15. Check spam and data privacy requirements.

When should you contact CURIAWEB support? #

If the form appears to be set up correctly but no messages are sent or technical errors occur, checking the WordPress and mail environment may be useful.

Helpful in this regard are:

  • the affected domain
  • Name of the form plugin
  • exact error message
  • Recipient domain of the test message
  • whether WordPress reports a successful transmission
  • whether SMTP is used
  • since when the problem has existed

You should not send passwords unprompted via support message.

Summary #

For a contact form in WordPress, you usually need a form plugin. With Contact Form 7, you can create a simple form, define the required fields, and then embed the form on a page.

The e-mail configuration is particularly important. The recipient address, technical sender address, and reply-to address fulfill different tasks and should be set up correctly.

After setup, you should always test the form completely. A success message in the browser alone does not prove that the email generated from it has actually reached the recipient.

Also consider spam protection, mobile display, and data privacy. A contact form is only sensibly set up when both the input on the website and the subsequent message transmission function reliably.

Last updated August 28, 2026
Was this article helpful?
Cookie Consent with Real Cookie Banner