Docs / Contact form guides
Add a contact form to WordPress without a plugin
Paste one HTML form into a Custom HTML block. Spam filtered, with no form plugin.
<form action="https://wrenform.com/f/YOUR_FORM_ID" method="POST">
<label>Name <input type="text" name="name" required></label>
<label>Email <input type="email" name="email" required></label>
<label>Message <textarea name="message" required></textarea></label>
<input type="text" name="_honey" style="display:none" tabindex="-1" autocomplete="off">
<button type="submit">Send</button>
</form>Create the form, copy the endpoint, and replace YOUR_FORM_ID in the snippet. Just trying it out? A form without an account gives you an endpoint from one request, free for 250 submissions a month; you confirm it by email.
You don't need a form plugin, an SMTP plugin or a mail setup to get a contact form on a WordPress page. The form posts straight to Wrenform from the visitor's browser. We filter spam, email you each message and keep it in your dashboard.
Steps
- Create a form in Wrenform and copy its endpoint from the Setup page.
- Edit the page in WordPress and add a Custom HTML block. With Elementor or a similar page builder, use its HTML or Code widget instead.
- Paste the snippet, with your form ID in place of
YOUR_FORM_ID. Click Preview, then Publish or Update. - In Wrenform, add your site under Allowed origins in the form's settings, with
https://: for examplehttps://example.com. If your site also answers onwww., add that too.
The fields are named name, email and message. The email field becomes the reply-to of your notification, so you can answer from your inbox.
On WordPress.com, which HTML a block keeps depends on your plan. If the form is gone or changed after you save, your plan doesn't allow it: use a plan that keeps custom HTML, or a self-hosted WordPress site.
The page after sending
By default, visitors land on our thank-you page, with a Back link to your site. To send them to your own page, create a "Thanks" page in WordPress and put its full address in Redirect to in the form's settings, for example https://example.com/thanks. See redirects.
Spam and email
- The hidden
_honeyfield catches most bots. Keep it in the form, hidden, withautocomplete="off". When it's filled, the submission goes to Spam and the sender still sees success. - No captcha is needed. See spam for the other checks and the sensitivity setting.
- Want each message in another tool too? Add a webhook (Pro and Agency).
- Submissions are stored in the EU. Free keeps them for 30 days, paid plans for 365 days.
Test it
Open the published page in a private window and send the form. You should land on the thank-you page, see the submission in your dashboard, and get an email.
Common problems
403 origin_not_allowed. Your site's address isn't in Allowed origins, or it differs (www.or not,httporhttps). Add the exact one you see in the address bar. See errors.- The form disappears or loses fields after saving. WordPress filters HTML for users who don't have the
unfiltered_htmlcapability: Authors and Editors on some sites, and everyone but Super Admins on a multisite network. Ask an administrator to add the block, or use a plan that keeps custom HTML. - Visitors still see the old page. A caching plugin or your host's cache is serving the version from before your edit. Clear the cache.
- Anything else. See troubleshooting.
Next steps
- HTML guide: the full snippet, with the optional timing check.
- Fields: more fields, checkboxes and the email subject.
- Pricing: free for 250 submissions a month, paid plans from €5.