Shortcodes, Writing & Editing

Contact Form

Use a contact form to let readers get in touch without exposing your email address.

How to add a Contact Form

  1. Hover over My Sites and click on WP Admin
  2. Click Pages > Add New
  3. Click Add Contact Form
  4. Click Insert Into Post to generate your form’s shortcode
  5. Publish the page, and view your form

You will see your own contact information pre-filled in the form, but your users will not. They will either see their own pre-filled information or a blank form.

↑ 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.

↑ Table of Contents ↑

Feedback management

feedbacks

You can read all feedback sent through your contact form in your feedback management area. Just click the “Feedbacks” link 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.

↑ Table of Contents ↑

Shortcode Reference

Saving a default form will produce 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@mygroovydomain.com' subject='Form Submitted'] would send an email notification with the subject line “Form Submitted” to the email address email @ mygroovydomain.com.

Still confused?

Contact support.

Not quite what you're looking for?

Get Help