Contact Form 7
Contact Form 7 is a lightweight and widely used WordPress plugin for creating contact forms and simple data‑collection forms.
At Terra, we use it for simple, reliable forms where we want full control over markup, behavior, and integrations without introducing heavy form builders.
When We Use Contact Form 7
Section titled “When We Use Contact Form 7”✅ Good use cases
Section titled “✅ Good use cases”- The form requirements are simple or moderate
- We need editorial teams to manage form copy
- We want full control over HTML and CSS
- We don’t need complex conditional logic or multi‑step flows
❌ Not great for
Section titled “❌ Not great for”- Complex multi‑step forms
- Advanced conditional logic
- Native submission storage without additional plugins
Creating a Form
Section titled “Creating a Form”- Go to WordPress Admin → Contact → Contact Forms
- Click Add New
- Give the form a clear name
- Define the form structure using form tags
- Save the form
Each form generates a shortcode:
[contact-form-7 id="123" title="Contact form"]Use this shortcode in pages, posts, or templates.
Form Structure and Fields
Section titled “Form Structure and Fields”Contact Form 7 uses a tag‑based syntax.
Common field examples:
[text* your-name][email* your-email][tel your-phone][textarea your-message][submit "Send"]Notes:
*marks a required field- Field names are used later in email templates
- Layout is controlled directly in the form markup
Email Configuration
Section titled “Email Configuration”Under the Mail tab, define how submissions are sent.
Typical setup:
- To: site or team email
- From: a valid domain email (avoid user email directly)
- Reply-To: user email field
- Message Body: use form tags
Example:
Name: [your-name]Email: [your-email]Message: [your-message]Messages and Validation
Section titled “Messages and Validation”The Messages tab allows customizing:
- Success messages
- Validation errors
- Required field notices
- Spam warnings
Keep messages clear and user‑friendly.
Spam Protection
Section titled “Spam Protection”reCAPTCHA
Section titled “reCAPTCHA”We commonly use Google reCAPTCHA for spam protection.
Steps:
- Register the site with Google reCAPTCHA
- Add keys under Contact → Integration
- Insert the reCAPTCHA tag in the form if needed
Akismet
Section titled “Akismet”If Akismet is enabled, it can automatically flag spam submissions without extra setup.
Best Practices at Terra
Section titled “Best Practices at Terra”- Keep forms short and focused
- Always test email delivery before launch
- Use a domain email for the sender
- Add spam protection in production
- Avoid piling plugins for complex flows
Knowledge Check
Test your understanding of this section
Loading questions...