How to Create and Embed a Custom Contact Form in WordPress Using WPForms
Every professional website needs a way for visitors to get in touch. Whether you’re running a blog, an e-commerce store, a service-based business, or a portfolio, a well-designed contact form is crucial for communication, lead generation, and building trust. It provides a structured way for visitors to submit inquiries without revealing your direct email address to spam bots.
While there are many form builder plugins available for WordPress, WPForms stands out for its intuitive drag-and-drop interface, robust features, and excellent performance. Even the free version (WPForms Lite) offers more than enough functionality to create a professional-looking contact form.
In this comprehensive tutorial, we’ll walk you through the entire process, from installing the plugin to customizing your form and embedding it on a page, ensuring you have a fully functional contact system by the end.
Step 1: Install and Activate the WPForms Plugin
The first step is to get the WPForms plugin onto your WordPress site.
- Log in to your WordPress Dashboard: Go to ZEALTERCODE0 and enter your credentials.
- Navigate to Plugins: In the left-hand sidebar, hover over “Plugins” and click on “Add New.”
- Search for WPForms: In the search bar on the top right, type “WPForms” and press Enter. You’ll see “WPForms Lite” (or “WPForms – Drag & Drop Form Builder for WordPress”) as one of the top results.
- Install the Plugin: Click the “Install Now” button next to the WPForms listing.
- Activate the Plugin: Once installed, the button will change to “Activate.” Click it to activate the plugin.
- Tip: After activation, you’ll likely be redirected to a welcome screen or the WPForms setup wizard. You can follow the wizard if you wish, but for this tutorial, we’ll proceed manually through the standard WordPress interface, which gives you more control and understanding of each step.
Step 2: Create Your First Contact Form
With WPForms installed and activated, you’re ready to build your form.
- Go to WPForms: In your WordPress dashboard, you’ll now see a “WPForms” menu item in the left-hand sidebar. Click on it, then select “Add New.”
- Name Your Form: The WPForms builder will open. At the top of the screen, you’ll be prompted to “Give Your Form a Name.” Choose something descriptive like “General Contact Form,” “Customer Inquiry Form,” or “Website Contact Us.” This name is for your internal reference only.
- Select a Template: WPForms offers several pre-built templates to get you started. For a standard contact form, the “Simple Contact Form” template is perfect. Click on it.
- Explanation: Using a template saves you time by pre-populating common fields like Name, Email, and Message. You can always add, remove, or customize these fields later.
Once you select the template, the WPForms builder interface will load, showing your chosen template with its default fields.
Step 3: Customize Your Form Fields
Now, let’s tailor the form to your specific needs. The WPForms builder is incredibly intuitive.
The builder has three main areas:
- Left Panel: Contains available fields, field settings, and form settings.
- Right Panel (Form Preview): Shows a live preview of your form as you build it.
- Top Menu: Tabs for Fields, Settings, Marketing, Payments, and Embed.
Adding, Editing, and Reordering Fields:
- Adding New Fields:
- In the left panel under “Fields,” you’ll see “Standard Fields” (e.g., Single Line Text, Paragraph Text, Dropdown, Checkboxes, Phone, Number) and “Fancy Fields” (e.g., File Upload, Rich Text, Captcha – some of which are Pro features).
- To add a field, simply drag it from the left panel and drop it into your form preview on the right. For example, you might want to add a “Phone” field if it’s important for your business.
- Configuring Existing Fields:
- Click on any field in the form preview (e.g., “Name”) to open its “Field Options” in the left panel.
- Label: Change the text that appears above the field (e.g., “Name” to “Your Full Name”).
- Format: For fields like “Name,” you can choose different formats (e.g., “Simple,” “First Last,” “First Middle Last”).
- Description: Add a small helper text beneath the field label (e.g., “How should we address you?”).
- Required: Toggle this switch to make a field mandatory. If a user tries to submit the form without filling a required field, they’ll see an error message. It’s usually a good idea to make Name and Email required.
- Field Size: Adjust the width of the field (e.g., “Large” for full width, “Medium,” “Small”).
- CSS Classes: (Advanced) Add custom CSS classes for styling if needed.
- Example Customization:
- Change “Name” to “Your Full Name” and make it required.
- Change “Email” to “Your Email Address” and make it required.
- For the “Message” field, change its label to “How can we help you today?” and adjust its “Field Size” to “Large.”
- Add a “Dropdown” field titled “Subject,” with choices like “General Inquiry,” “Support Request,” “Partnership Opportunity,” and make it required.
- Reordering Fields:
- To change the order of fields, simply click and hold a field in the form preview and drag it to your desired position. A blue line will indicate where it will be placed.
- Deleting Fields:
- Hover over a field in the form preview, and a small trash can icon will appear in the top right corner of the field box. Click it to remove the field.
- Tip: Keep your contact form concise. Only ask for information that is absolutely necessary. Long forms can intimidate visitors and lead to lower submission rates.
Step 4: Configure Form Settings
Once your fields are set, move to the “Settings” tab in the left panel of the WPForms builder. This section is critical for how your form behaves after submission.
A. General Settings:
- Form Name: You can change the name here if you wish.
- Form Description: Add an internal description if you need it.
- CSS Classes: (Advanced) Add custom CSS classes to the entire form if desired.
- Submit Button Text: This is the text displayed on the button the user clicks to submit the form (e.g., “Send My Message,” “Submit Inquiry,” “Get in Touch”).
- Submit Button Processing Text: The text shown while the form is being submitted (e.g., “Sending…”, “Please Wait…”).
- Enable anti-spam protection: Tick this box. For more robust protection, you can configure hCaptcha or reCAPTCHA in WPForms -> Settings -> CAPTCHA.
B. Notifications:
This is where you tell WPForms where to send the form submissions.
- Admin Email: By default, “Send To Email Address” is set to ZEALTERCODE0. This is a “Smart Tag” that pulls the email address configured in your WordPress Settings -> General.
- Custom Email: If you want submissions to go to a different email (e.g., ZEALTERCODE0), delete ZEALTERCODE1 and type in the desired email address. You can also add multiple email addresses, separated by commas.
- Email Subject: This is the subject line you’ll see in your inbox (e.g., “New Contact Form Submission from Your Website”). You can use Smart Tags here too. For example, ZEALTERCODE0 might be the user’s name field, so the subject could be “New Message from {field_id=”1″}.”
- From Name: The name that appears as the sender of the notification email (e.g., “Your Website Contact Form”).
- From Email: It’s often best practice to use a generic email associated with your domain here (e.g., ZEALTERCODE0) rather than the user’s email, to avoid email delivery issues.
- Reply To: This is important! Set this to ZEALTERCODE0 (assuming field ID 2 is the user’s email address). This allows you to simply click “Reply” in your email client and respond directly to the person who filled out the form.
- Message: By default, this includes ZEALTERCODE0, which sends all submitted form data. You can customize this if you only want specific fields.
- Tip: Always test your notifications thoroughly after setting them up to ensure emails are being sent and received correctly. Check your spam folder if you don’t see them.
C. Confirmations:
This defines what the user sees immediately after they submit the form.
- Confirmation Type:
- Message (default): Displays a simple message on the same page. This is the most common choice.
- Confirmation Message: Customize the text here (e.g., “Thanks for contacting us! We’ve received your message and will be in touch shortly.”).
- Show Page: Redirects the user to a specific page on your site (e.g., a “Thank You” page you’ve created).
- Tip: This is great for tracking conversions (e.g., using Google Analytics) or providing more information.
- Go to URL (Redirect): Redirects the user to any URL, internal or external.
- Tip: A clear and reassuring confirmation message or page is essential for a good user experience. It lets the user know their submission was successful.
Step 5: Save Your Form
Before leaving the builder, make sure to save all your hard work!
- Click the “Save” button in the top right corner of the WPForms builder interface.
Step 6: Embed Your Form into a WordPress Page or Post
Now that your form is built and configured, it’s time to put it on your website. There are a few ways to do this.
Method 1: Using the Block Editor (Gutenberg) – Recommended
This is the easiest and most modern way to embed your form.
- Go to Pages (or Posts): In your WordPress dashboard, navigate to “Pages” -> “Add New” to create a new page, or “Pages” -> “All Pages” to edit an existing one (e.g., your “Contact Us” page).
- Add a WPForms Block: Once in the editor, click the “+” icon (Add block) to add a new block.
- Search for WPForms: Type “WPForms” in the search bar or scroll down to the “Widgets” section.
- Select Your Form: Click on the “WPForms” block. A dropdown will appear in the block itself. Select the name of the form you just created (e.g., “General Contact Form”) from the list.
- Publish/Update: Click the “Publish” or “Update” button in the top right corner to save your page/post.
Method 2: Using a Shortcode (for Classic Editor or Specific Themes)
If you’re using the Classic Editor or need to embed the form in a theme area that only accepts shortcodes (like a custom widget area), you can use this method.
- Get the Shortcode:
- In the WPForms builder (WPForms -> All Forms -> Edit your form), click the “Embed” button at the top of the builder interface.
- Choose the option “Use a Shortcode.”
- Copy the shortcode provided (it will look something like ZEALTERCODE0, where “5” is your form’s ID).
- Paste the Shortcode:
- Go to the page or post where you want to embed the form.
- If using the Block Editor, add a “Shortcode” block and paste the shortcode there.
- If using the Classic Editor, simply paste the shortcode directly into the content area.
- Publish/Update: Save your page/post.
Method 3: Using a Widget (for Sidebars or Footers)
You can also place your form in a widget area like a sidebar or footer.
- Go to Widgets: In your WordPress dashboard, navigate to “Appearance” -> “Widgets.”
- Add WPForms Widget: Find the “WPForms” widget in the list of available widgets.
- Drag to Widget Area: Drag the “WPForms” widget to your desired widget area (e.g., “Sidebar,” “Footer Column 1”).
- Select Your Form: In the widget settings, choose the form you created from the “Select a Form” dropdown.
- Save: Click “Save” or “Update” for the widget area.
- Tip: After embedding, always view the live page on your website to ensure the form appears correctly and is properly formatted.
Step 7: Test Your Form
This is a critical final step to ensure everything is working as expected.
- Visit the Live Page: Go to the page on your website where you embedded the contact form.
- Fill Out the Form: Enter some test data into all the fields, ensuring you fill in both required and optional fields.
- Submit the Form: Click your custom submit button (e.g., “Send My Message”).
- Verify Confirmation: Check that the confirmation message appears or that you are redirected to your chosen confirmation page/URL.
- Check Your Email: Open the email inbox you configured in the “Notifications” settings (Step 4B). You should receive an email with the submitted form data.
- Troubleshooting Email Issues: If you don’t receive the email, check your spam or junk folder. If it’s still not there, it’s possible your server isn’t sending emails reliably. In this case, I highly recommend installing an SMTP plugin like WP Mail SMTP to ensure your WordPress emails are delivered correctly.
- Check WPForms Entries: In your WordPress dashboard, go to “WPForms” -> “Entries.” You should see your test submission listed there. Click on it to view the full details.
- Tip: Testing ensures that your visitors will have a smooth experience and that you won’t miss out on important communications.
Conclusion
Congratulations! You’ve successfully created and embedded a custom contact form using WPForms, providing your website visitors with an easy and reliable way to connect with you. WPForms simplifies a complex process, making professional form building accessible to everyone.
Now that you have the basics down, feel free to explore more advanced features in WPForms Lite, or consider upgrading to the Pro version for features like conditional logic, payment integrations, survey tools, and more advanced field types. The possibilities for gathering information and interacting with your audience are vast!