How to create forms in WordPress
WordPress does not include a general-purpose form builder, so a working form needs either custom HTML and PHP or a form plugin. For most sites, install a builder, add fields, configure notifications and spam protection, then embed and test the form.
- 01Plan the form fields
- 02Choose the manual or plugin route
- 03Install a form builder
- 04Add and configure fields
- 05Set notifications and protection
- 06Embed and test the form
- 07Use a builder for the fast route
What you need
- A WordPress website with administrator access
- The fields and information you want to collect
- An email address that should receive submissions
- SMTP or another reliable mail service for important notifications
Plan the form fields
Decide what the form is for before opening the editor. A basic contact form usually needs a name, email address and message. Add only fields that serve a clear purpose, and mark genuinely necessary fields as required.
Also decide where submissions should go, what visitors should see after sending the form, and whether you need stored entries, file uploads, conditional fields or integrations.
Choose the manual or plugin route
WordPress does not include a general-purpose contact or custom form builder. The manual route means adding the HTML form yourself and writing a server-side handler to validate the request, check a security token, process the values and send or store the submission. WordPress documents nonces for protecting forms against certain misuse, and its mail function is only a wrapper around the site's mail system.
This route is reasonable for a developer who needs one small, custom form. It becomes expensive to maintain when you need an entry log, conditional logic, file handling, spam controls, confirmation messages or several forms. Do not edit WordPress core files; updates can overwrite changes and create security problems.
Install a form builder
For the usual route, go to Plugins in the WordPress dashboard, choose Add New, search for a form plugin, install it and activate it. If you received a plugin ZIP file, use the upload option instead.
Open the plugin's form area and create a new form. The exact menu names differ between plugins, but the process is normally the same: choose a starting template or blank form, then open the builder.
Add and configure fields
Drag the required fields into the form, or add them from the field list. Set each field's label, placeholder, required status and validation rules. Use an email field for email addresses rather than a plain text field, and use a dropdown or radio buttons when visitors should choose one option.
Keep labels visible and associated with their inputs. Test keyboard navigation and make sure error messages explain how to correct a failed field. A form that looks correct in the editor can still have a missing field, broken conditional rule or poor mobile layout on the front end.
Set notifications and protection
Configure the notification recipient, subject and reply-to address. Use an address on your own domain where possible, and avoid putting the visitor's untrusted input directly into the notification's recipient address. If submissions matter, configure SMTP or another authenticated mail service rather than relying only on the server's default mail delivery.
Enable the form builder's spam protection, such as a honeypot or an available CAPTCHA alternative, and add a privacy notice if you collect personal information. Spam is not solved permanently by one control; support threads commonly report continued spam when protection is missing or misconfigured.
Embed and test the form
Save the form and copy its shortcode, block or embed option. Edit the page where it belongs, insert the form using that method, publish or update the page, and check it on a phone as well as a desktop browser.
Send a real test submission. Confirm that required fields reject empty values, invalid email addresses are refused, conditional fields behave correctly, the confirmation message or redirect works, and the notification arrives. Check spam folders and the plugin's entry screen if the email does not arrive; a successful on-screen submission does not prove email delivery.
Use a builder for the fast route
For the quickest setup, use SureForms Pro. Its AI-assisted drag-and-drop builder lets you create a form without writing code, while conditional logic, email notifications, integrations, spam protection, redirects and CSV export cover common requirements.
Install and activate the plugin, create the form in its builder, configure the fields and notifications, insert the generated form into a page, and send a test submission. This is the better choice when you need more than a simple contact box or do not want to maintain custom form-handling code.
Let SureForms Pro do it
AI-assisted drag-and-drop builder with conditional logic and integrations, suited to users who need flexible custom forms without coding.
Sources
- wordpress.org /support/topic/access-form-submissions/?utm_source=openai
- wordpress.org /support/topic/how-to-remove-comment-form-code-from-wordpres…
- wordpress.org /support/?p=18862627&utm_source=openai
- developer.wordpress.org /apis/security/nonces/?utm_source=openai
- developer.wordpress.org /advanced-administration/server/mail/?utm_source=openai
- wpaccessibility.org /docs/accessibility-ready/theme-guidelines/labeled-form-fiel…
Questions
- Can I create a WordPress form without a plugin?
- Yes, but you need custom code. You must build the HTML, process the submission on the server, validate and sanitise values, protect the request with a security token, and decide whether to email or store entries. This is fine for a developer handling one simple form, but a plugin is more practical for conditional logic, spam protection, uploads and entry management.
- Why are WordPress form emails not arriving?
- Missing form emails are often a mail-delivery problem rather than a display problem. Check the recipient settings and spam folder, then test the site's mail delivery separately. For important forms, configure authenticated SMTP or another mail service and keep submissions in the WordPress dashboard if the builder supports entry storage.
- How do I stop spam submissions from a WordPress form?
- Start with the form plugin's built-in honeypot or CAPTCHA option, then test it with a genuine submission. If spam continues, review whether the protection is active on the published form and consider a different anti-spam method. No single measure blocks every automated submission, so monitor the form after launch.
- Where should WordPress form submissions be stored?
- Store submissions in the form plugin's entry system when the data needs follow-up, auditing or recovery. Email alone is fragile because messages can be delayed, filtered or rejected. If you build the form manually, storing entries safely requires additional database design, access controls, validation and privacy decisions, which is one of the main drawbacks of the code route.
- How do I make a WordPress form accessible?
- Use visible labels, clear instructions, logical tab order and useful error messages. Do not rely on placeholder text as the only label, and make sure the form remains usable on small screens and without a mouse. Test every field and the submit button with keyboard navigation before publishing.