Do you want to embed a form on your website? Whether it’s a simple contact form or a customer survey, forms add functionality. There are endless ways to use them.
In this post, we’ve put together a step-by-step guide to show you the easiest way to embed a form on your WordPress website.
How Do I Add a Fillable Form to My Website?
You can embed a form on your website by using the WPForms plugin, which is the easiest and fastest way.
Normally, you would need to use an embed code snippet to add a form to your website. For example, if you wanted to embed Google forms on your site, you would need a bit of html code called an iframe to add the form to your site. Then you would need to use CSS to style the form and make it look the way you wanted.
With WPForms, adding a form to your WordPress site is much easier. It has 3 different methods for embedding a fillable form on your website without the need for extensive code snippets. We’ll walk you through those embed options in this post.
How to Embed a Form on Your WordPress Website
We’re going to show you 3 different ways to easily publish a form in WordPress.
In This Article
Let’s get started.
Step 1: Install the WPForms Plugin
WPForms allows you to create your own web forms from scratch or choose from 500+ templates. The options include sign up forms, registration forms, and tons of industry-specific forms for every type of business. And they’re super easy to embed on your WordPress website. To begin, download the WPForms plugin.
Once you’ve downloaded the plugin, you’ll need to upload it to your website. If you’re not sure how to do that, this beginner’s guide to installing WordPress plugins can walk you through the process.
Step 2: Create a New Form
Once you’ve installed the WPForms plugin, you’re ready to create forms using the drag-and-drop builder. Whether you want to build your own form or start from a template is up to you, but the first thing to do is click Add New.
Once you click that button, you’ll see a variety of templates you can choose from. There’s also the option to select a blank form and create your own.
When you hover your mouse over your selection, you’ll see 2 options:
- Use template
- View demo
If you view the demo, it will show you what the embedded form looks like. Remember that the template is customizable, so if there’s anything you want to change, you can.
Once you’ve determined which template you want to use, go ahead and click the use template button. It will open in the editor. For this post, we’ll be using the simple contact form template.
Now is the time to customize your form if you’d like. In our case, the template only collected a phone number. We customized it by first adding a checkbox field asking for their contact preference and adding an email option.
Then we set up a little bit of conditional logic, which you can find in the Smart Logic tab under Field Options. Conditional logic lets you set up rules so that users only see the fields that apply to them.
In this example, if they select email, they’ll see a field to provide an email address. If you wanted to include a GDPR checkbox here, you could easily do that as well.
If they select phone, they can provide a phone number.
Now it’s time to choose how you want to embed your form.
Step 3: Embed Your Form
WPForms has three ways to embed your form on your website. We’ll show you all three ways to do it here and you can choose the one that’s easiest for you.
Using the WPForms Embed Button
The first embed method is to simply use the embed button at the top of your form editor.
Once you click that button, you’ll get the option to either select an existing page or create a new page. You can choose whichever makes the most sense for your site. We created a contact page here. Once you’ve got that, you can click the Let’s Go! button.
Once you do that, the page draft will open and you’ll see the form embedded. Click publish and you’re good to go!
Using the WordPress Block Editor
Embedding a form right from the WordPress block editor is another easy way to add one of your forms to a post or page.
Open the page where you want the form to appear, and click the blue plus (+) icon.
A menu will open with a variety of widget options. Scroll down until you find the WPForms widget and click on it. When you do that, a box will open and you can select the form you want to embed.
After you make your selection, you’ll see the form embedded on your page.
Using the Shortcode Embed
Another simple way to embed a form on your website is by pasting a shortcode, which takes only a matter of seconds. You can find your form’s shortcode in 2 places:
The Embed Button
When you click the embed button from the editor, as we did above, one of the alternative options is to use a shortcode. If you click on that, your form’s shortcode will appear and you can copy it.
Your List of Forms in the WPForms Plugin
From your WordPress dashboard, click on the WPForms plugin in the sidebar. It will display the list of forms you’ve created and you’ll see the shortcodes for all of them. This is helpful if you’re not actively working on a form but need to grab the shortcode quickly to embed it somewhere.
After you’ve copied the shortcode, go to the page or post where you want to embed it. Once again, you’ll want to click on the blue plus (+) sign in the top left corner to get a list of dropdown options.
Instead of selecting the WPForms widget as we did before, we’re going to select the Shortcode widget instead.
When you click that, a box appears in your post editor. All you have to do is paste that shortcode into the box.
If you preview the page, you’ll see that the form is successfully embedded.
Additionally, you can also paste the shortcode directly into the editor instead of going through the widget.
And again, after pasting it where you want it to appear within the content, you can preview the page and see that it’s been embedded.
This method also works great for easily adding a form to the footer of your website.
Step 4: Publish Your Form
Now that you’ve successfully created and embedded your form, it’s time to publish it! Go ahead and click that publish button in WordPress. When you visit the live page, your embedded form is ready to gather information.
By default, the user will remain on the same page. If you want to redirect users to another page after they submit their form responses, you can.
Next, Secure Your Form With hCaptcha
That’s it! Now you know how to add a form to a web page in WordPress without the need for an iframe code snippet.
Do you want to add an extra layer of spam protection to your form? WPForms includes hCaptcha integration, making it simple to do. Learn how to secure your WordPress form with hCaptcha.
Ready to build your form? Get started today with the easiest WordPress form builder plugin. WPForms Pro includes lots of free templates and offers a 14-day money-back guarantee.