Shortcodes, Writing & Editing

Contact Form

Use a contact form to let readers get in touch without exposing your email address. You can also use a contact form for creating an RSVP form for an event by adding some dropdown or checkbox fields to the form.

Note: This is not a secure method for collecting credit card numbers, bank account numbers, etc. To collect payments, please use PayPal or a similar payment processing service that securely handles financial transactions.

Watch the video below for a quick overview of how it works, and read below for more examples and settings.

How to Add a Contact Form in your Posts or Pages

To add a contact form, go to My Sites and click on Pages → Add. You can also add a Contact Form to existing Posts or Pages by editing them in the Visual Editor. In the toolbar, you’ll see the “+” symbol and the “@ Add Contact Form” option, like in the example below:

add-contact-form2

The contact form comes with four predefined fields: Name, Email, Website and Comment. You’re free to edit, delete or add more fields to your form. Note that you can decide to make your field required or not.
Each field requires a label and a field type. You can choose among the following field types:

  • Checkbox: allows the user to tick a box to make a choice
  • Dropdown: creates a dropdown of options
  • Email Address: requires an email address format
  • Name: text field
  • Radio Button: similar to the checkbox field type
  • Text: a single line of text
  • Text Area: several lines of text
  • Web Address: requires a URL format

contact-form-fields

↑ Table of Contents ↑

Notification preferences

When a user submits your contact form, it will be emailed to the author of the post/page (to the email address that they have on file for their WordPress.com account), and the subject line will be the title of your post. If you wish, you can change both the recipient and the email subject of your emails by clicking the “Settings” tab. Separate recipient emails with a comma to send to multiple recipients. You can also change the email address and subject using the shortcode (see below).

Contact-Form-Notification-Settings

↑ Table of Contents ↑

How to Add a Contact Form with Shortcodes

You can add a basic contact form using the following shortcode:

[contact-form]
[contact-field label="Name" type="name" required="true" /]
[contact-field label="Email" type="email" required="true" /]
[contact-field label="Website" type="url" /]
[contact-field label="Comment" type="textarea" required="true" /]
[/contact-form]

Each contact form shortcode must start with [contact-form] and end with [/contact-form]

Fields can be added or removed from the shortcode manually. For instance, if you wished to remove the website textbox, you’d simple remove that line, like this:

[contact-form]
[contact-field label="Name" type="name" required="true" /]
[contact-field label="Email" type="email" required="true" /]
[contact-field label="Comment" type="textarea" required="true" /]
[/contact-form]

Each field is wrapped in a [contact-field /] tag.

The available field attributes are as follows:

label Gives the field a descriptive label.

type Available options include:

  • text – Displays a regular single line text box
  • textarea – Displays a multi-line text box
  • radio – Displays radio options
  • checkbox – Displays a single checkbox
  • select – Displays a drop down with multiple options
  • email – Displays a single line text box
  • name – Displays a single line text box
  • url – Displays a single line text box

required If you’d like the field to be required, add required=”true” or required =”1″ if not, simply leave this out.

options Select and radio fields have a fourth option called “options”. This is a comment separated list of all the options available within the drop down or radio field. An example would be:

[contact-field label="Sex" type="radio" options="Female,Male" /]

You can also change notification preferences for an embedded contact form by adding the following parameters to the opening contact-form tag:

  • to=’email address’ – The email address where the submitted form notifications should be sent.
  • subject=’email subject’ – What appears in the subject line for email notifications.

For example, [contact-form to='email@yourgroovydomain.com' subject='Form Submitted'] would send an email notification with the subject line “Form Submitted” to the email address email@yourgroovydomain.com.

↑ Table of Contents ↑

Tips

  • Add to Pages, Posts, or Widgets – Contact forms can be added to pages or posts, or if you copy the generated code, you can add your contact form to a text widget.
  • Forms are customizable – Contact forms can be customized. You can add and remove fields, choose which fields are required, change the email address, or change the subject settings. The form’s appearance can be further customized with CSS.
  • Edit an existing form – To edit an existing form, edit the post or page from WP Admin, then click “Add Contact Form.”
  • One per page – Each post, page, and text widget will only display one contact form.
  • Remember, email is not secure – Do not use contact forms for sensitive information like credit card numbers, as the information will be transmitted by email.
  • Built-in spam filter – We filter submissions through Akismet to fight spam, then add them to your feedback management area, which is accessible to Editors and Administrators on you site. We also email a copy to you.
  • Available on WordPress.org – If you’re running your own copy of WordPress.org, you can use Jetpack to get the same functionality.
  • Reply back – If you would like to reply back to a contact form submission, you will need to use your own personal email to do so.  You can reply back with a custom email address by creating an account with an email provider listed here.

↑ Table of Contents ↑

Feedback Management

Note: The instructions from these steps are referring to the WP Admin dashboard. You can get to this dashboard by adding /wp-admin to the end of your site’s url (e.g.: example.wordpress.com/wp-admin)

You can read all feedback sent through your contact form in your feedback management area. Just click the Feedback tab in your left-hand menu in WP Admin.

Feedback is managed much like comments. If a feedback is spammy, hover over it and click Spam. If you want to delete a feedback, hover over it and click Trash. Or, if legitimate feedback is marked as spam, you can click the Not Spam link.

Still confused?

Contact support.

Not quite what you're looking for?

Get Help