A lightweight WordPress contact form plugin that provides a simple shortcode-based contact form with customization options, optional Google reCAPTCHA v3 support, AJAX form submission, persistent form input storage, and submission rate limiting.
- Simple contact form via shortcode
- Fields: Name, Email, Subject, Message
- Customizable field labels
- Custom CSS injection via shortcode
- AJAX form submission (no page reload required)
- Optional Google reCAPTCHA v3 integration
- Configurable recipient email address
- Stores entered form data locally so it is preserved on page reload
- 5-minute submission cooldown to prevent spam/flooding
- Lightweight and fast
- Download the WPConstructor Contact plugin ZIP at WPConstructor Contact Release
- Go to your WordPress Admin Panel
- Navigate to Plugins → Add New
- Click Upload Plugin
- Select the ZIP file and install it
- Activate the plugin
- (Optional) Configure constants in wp-config.php (see Configuration section)
- Add the contact form shortcode to any page or post:
[wpcn_contact]
[wpcn_contact]
This displays a contact form with default labels.
You can customize labels using shortcode attributes:
[wpcn_contact
name="Your Name"
email="Your Email"
subject="Subject"
message="Message"]
You can inject custom styles using the css attribute:
[wpcn_contact css=":root {--wpcn-contact-font-size: 18px;}"]
- .wpcn-contact-form input – input fields
- .wpcn-contact-form textarea – message field
- .wpcn-contact-form button – submit button
- #wpcn-contact-result – message output container
- #wpcn-contact-result.wpcn-contact-success – success message
- #wpcn-contact-result.wpcn-contact-error – error message
- #wpcn-contact-result.wpcn-contact-info – info message
The form uses AJAX to submit data asynchronously without refreshing the page.
- No page reload after submission
- Faster user experience
- Better UX feedback handling
- Seamless integration with themes
- Form data is sent via background request
- Success or error messages are displayed dynamically
- Form fields remain intact unless submission succeeds
To prevent spam and repeated submissions, the plugin enforces a 5-minute cooldown per user.
- After a successful submission, the user must wait 5 minutes before submitting again
- Submissions during cooldown are blocked
- An informational message is shown via:
#wpcn-contact-result.wpcn-contact-info
- Prevents spam flooding
- Reduces server load
- Improves email deliverability
- Protects against bot abuse
The plugin automatically stores form input values in the browser.
- If a user refreshes the page
- Or accidentally navigates away and returns
Their entered data (Name, Email, Subject, Message) will still be present.
By default, messages are sent to the WordPress admin email.
define('WPCN_CONTACT_EMAIL_TO', 'your-email@example.com');
define('WPCN_RECAPTCHA_SITE_KEY', 'YOUR_GOOGLE_SITE_KEY');
define('WPCN_RECAPTCHA_SECRET_KEY', 'YOUR_GOOGLE_SECRET_KEY');
Once enabled, form submissions are protected by Google reCAPTCHA v3.
| Attribute | Description | Example |
|---|---|---|
| name | Label for Name field | name="Your Name" |
| Label for Email field | email="Your Email" | |
| subject | Label for Subject field | subject="Topic" |
| message | Label for Message field | message="Your Message" |
| css | Custom CSS injection | css="input {font-size:16px;}" |
- Sends email submissions to configured recipient
- Uses WordPress mail system
- Displays success/error/info messages dynamically (AJAX)
- Preserves user input across page reloads
- Enforces 5-minute submission cooldown per user
- Optional spam protection via reCAPTCHA v3
- Check WordPress mail configuration
- Verify recipient email constant
- Ensure JavaScript is enabled
- Check for theme or plugin script conflicts
- Disable caching/minification temporarily
- Wait 5 minutes before submitting again
- Check browser storage if testing repeatedly
- Ensure JavaScript is enabled in the browser
- Check for caching conflicts
- Verify both keys are correctly set in wp-config.php
- Ensure domain is registered in Google reCAPTCHA console
WPConstructor Contact is released under GPL 3.0 or later licensing terms. See LICENSE.md for details.
- Name: WPConstructor Contact
- Version: 0.4
- Type: WordPress Plugin
