Skip to main content

How to Easily Create a Contact Form Popup in WordPress

Are you looking for an easy way to create a contact form popup for your website?

Contact forms help visitors get in touch with you easily. But many visitors refrain from going to the contact page for submitting details.

A good solution is to place the forms inside popups. This makes it easier for the users to reach out to you if they have any concerns or inquiries.

Creating a contact form popup is easy and requires two plugins:

  1. an easy to use contact form plugin
  2. a powerful popup plugin

In this post, we’ll show you easy-to-follow steps for building a contact form popup. In the end, we’ll also show you how to add a popup to a WordPress menu for boosting conversions!

Creating a Contact Form in WordPress

The first thing we need is a contact form that will be embedded inside the popup. 

With so many contact form plugins available, finding the right one for your needs can be challenging.

For this article, we’ve selected WPForms because it’s easy to use, lightweight, and has over 10,000+ 5 star reviews on WordPress.org.

Here is why we prefer WPForms over other plugins:

  • Free: WPForms is available in free as well as paid versions.
  • Ease of use: It’s beginner-friendly and comes with an easy to use drag and drop builder.
  • Templates: You get plenty of pre-built form templates to save you time.
  • Integrations: WPForms can be integrated with all the popular email marketing tools like Constant Contact, Mailchimp, Aweber, etc.

Now that you know why WPForms is the best plugin, let’s take a look at how to create a form with it.

Here is the final output you can expect at the end of this tutorial.

contact form final

Step 1: Install and Activate the WPForms Plugin

The first step is to install the WPForms plugin.

If you’re installing a plugin for the first time, check out this beginner friendly guide on installing a WordPress plugin.

Open your WordPress dashboard and go to Plugins » Add New.

Search for WPForms.

wpforms plugin

Install and activate the plugin.

Step 2: Create a Contact Form with WPForms

After the plugin is activated, you’ll see WPForms welcome page.

wpforms welcome

Now, it’s time to create a new contact form.

You can use the Create Your First Form button on the landing page for creating a contact form.

Another way is to use the WPFroms menu.

Simply go to WPForms » Add New.

add new wpforms

Enter a name for your contact form and select the Simple Contact Form option.

simple contact form template

This will open up the drag and drop builder and the Simple Contact Form template.

By default, this template has 3 fields. If you want to add other fields, just drag them from the left-hand side and drop them in the form.

For example, we added a dropdown field “Subject” with three options.

fields

Visitors can select one of the options while submitting the form.

form fields

Click on the Save button to save your changes.

save your contact form with wpforms

Now, click on the Embed tab to get the form shortcode. Don’t forget to copy the shortcode. You’ll need to copy this shortcode into your popup plugin later (Step 5).

embed wpforms

That’s it! Your contact form is ready for use.

Step 3: Install and Activate OptinMonster Popup Plugin

For this tutorial, we’ll use OptinMonster as our popup plugin.

optinmonster border

OptinMonster is the #1 popup plugin for growing email subscribers and increasing your online sales. The drag and drop builder makes it easy to embed the contact form inside the popup.

If you’re using OptinMonster for the first time, sign up for an account

Follow the same steps for installing the OptinMonster plugin as we did for the WPForms plugin.

activate-optinmonster

Once the plugin is activated, you’ll see a setup wizard for connecting OptinMonster to WordPress.

Connect to WordPress

Click on the Connect to WordPress button after selecting the OptinMonster account.

You’ve successfully completed the first half of this tutorial.

Step 4: Create an OptinMonster Campaign

The next step is to create a popup with OptinMonster.

Click on the Campaigns menu from the OptinMonster dashboard for creating your first campaign.

create a campaign

In the next step, we’ll select the popup option as your Campaign Type.

popup forms

Scroll down on the template’s section. OptinMonster comes with more than 75 readymade templates designed for high conversions.

Since we’re dealing with a shortcode, select the Canvas template.

canvas template

It’s basically a blank template suitable for adding HTML shortcodes and other code snippets.

Enter a name for your campaign and click the Start Building button on the next step.

start building campaign

Step 5: Embed the Form in Popup

Search for the HTML block from the left-hand blocks section and drop it on the blank canvas.

html block

Here you’ll need to add the WPForms contact form shortcode.

Note that you won’t be able to check the preview of the WPForms shortcode inside the campaign dashboard.

wpforms shortcode

Click on the Save button and move to the next steps. 

Now, we will add custom CSS to our contact form to make it stylish and more appealing.

Don’t worry if you’re new to CSS. You need to copy the code and paste it into the campaign Custom CSS setting.

Here’s the code we used in today’s demo to style our form:

Click on the settings button at the left bottom of the page and go to Advanced » Custom CSS.

custom css border

Paste the code in the box and click on the Save button.

Step 6: Set Your Display Rules

Before moving to the display rules step, we strongly recommend checking out this guide on creating your first OptinMonster campaign. This guide will help you learn more about setting display rules for your campaigns.

OptinMonster offers plenty of targeting rules and triggers that you can choose from.

Some of the most popular triggers are MonsterLinks and Exit-Intent trigger. Both these triggers can be used in case of a contact form popup.

We recommend you choose one of these display rules (not both) considering your popup requirements.

MonsterLinks is best if you want your contact form popup appear when the user clicks a link or a button. This means that visitors can connect with you instantly if they have any queries by just clicking on the link and a popup will be shown.

Setting up the MonsterLinks display rule is easy. Check out this complete guide on how to use MonsterLinks in OptinMonster.

Now it’s time to see the Exit-Intent® display rule. It works by showing a popup to a customer precisely when they’re about to leave your website.

We strongly recommend using the Exit-Intent trigger on a products page or a checkout page if you’re running an eCommerce store. That way if someone leaves your page without making a purchase, you could show them a contact form. This also means your users can easily reach out to you and let you know about their concerns.

Let’s see OptinMonster’s Exit-Intent® technology in action.

The first step is to go to Display Rules in your OptinMonster editor.

Display Rules OM editor

Search for Exit Intent and click on the rule.

exit rule

Select the exit intent display condition, and you can also set the sensitivity level.

You can even add additional rulesets if you wish to.

Don’t forget to Save the changes before moving on to the publishing step.

Step 7: Publish Your Contact Form Popup

The last step is to publish the campaign and display the contact form popup on the front end.

Go to the Publish tab and review the campaign summary on the right side.

Once you’re confirmed with the settings, change the status from Draft to Publish.

Publish the campaign

That’s it.

Now, whenever a visitor is about to exit the page on your website, they’ll see an exit intent popup.

Here’s our final contact form result:

wpforms output

You’ve successfully created a contact form popup using WPForms and OptinMonster.

BONUS! Adding a Popup to a WordPress Menu

Are you looking to generate more targeted leads from your WordPress site? One easy way to do that is to open a WordPress lightbox popup from a custom menu link like this:

The research shows that the top left of a web page attracts the most views. That makes your main menu a great place to attract attention with a tempting offer.

Here’s the campaign we’re going to create. Before we begin, you’ll need to get OptinMonster so you can create this effective campaign.

create a wordpress custom link menu popup

You’ll learn how to integrate OptinMonster’s MonsterLinks™ on-click optins with WordPress navigation menus so you can get more targeted leads and interested subscribers.


And  for the in-depth guide, we also recommend reading the written instructions below.

Simply follow all the steps mentioned in the above tutorial until Step 6. In Step 6, instead of choosing Exit Intent, choose MonsterLinks.

To do this, go to Display Rules and set a condition of If visitor clicked MonsterLink™.

monsterlink

The next step is to create your WordPress menu item and add the MonsterLink™.

First, log in to your WordPress dashboard, and go to Appearance » Menus. Choose the menu you want to add your link to.

To add a new link, select Custom Links. Give the menu item a name via the Link Text field, and add a hashtag (#) in the URL field.

Click Add to Menu, then Save the menu.

Keep this window in your browser open, since you’ll need it for the next step.

monsterlink menu

Next, you’ll need to add code to the functions.php file of your WordPress theme.

Here’s an example of the code you’ll need:

add_filter( 'nav_menu_link_attributes', 'ekf_menu_attribute_add', 10, 3 );
function ekf_menu_attribute_add( $atts, $item, $args )
{
  // Specify the menu item ID we want to add our attribute to
  $menu_link = 64;

  // Conditionally match the ID and add the attribute and value
  if ($item->ID == $menu_link) {
    $atts['data-optin-slug'] = 'jiqobgwsx9qinkci';
    $atts['class'] .= 'manual-optin-trigger';
  }
  //Return the new attributes
  return $atts;
}

You can copy and paste this code to use yourself, but you’ll have to tweak a few things to get it to work for your website.

The items you’ll need to change are:

  1. The number after $menu_link = in line 5
  2. The string of characters in single quotes after $atts['data-optin-slug'] = in line 9

For the first item, you’ll need the ID of the link in your menu. You can find this in the menu editing screen you’re already in. Simply hover your mouse over the Remove button. That’ll bring up a link in the bottom of the browser that shows the menu ID, right after the part that says &menu-item=.

In this example, the menu ID is 2021:

Then you’ll need the slug for your campaign. You can find this in the campaign dashboard. In the campaign list, click on the campaign you want to preview. It will show up in the campaign preview pain. There, you’ll find the Campaign ID for the campaign slug.

optinmonster campaign id

Add those two items to the code, then save your changes to the functions.php file.

That’s it! Now you know how to use a WordPress menu custom link to trigger a lightbox popup so you can get more targeted leads. Don’t forget to publish the form as mentioned in the above tutorial.

Ready to use popups to grow your business? Get OptinMonster today to get started!

Comments

Popular posts from this blog

13 Best Cheap Web Hosting Services of 2022 (Ranked)

  Let’s face it: there are a ton of different   web hosting options   on the market with great features. A lot of the time, it comes down to price.  I ranked and reviewed the best cheap web hosting options to try this year.  These reviews are based on pricing, hosting features, integrations, security, speed, and more. Let’s get started. Disclaimer:  This article contains affiliate links that I receive a small commission for at no cost to you. However, these are merely the tools I fully recommend when it comes to hosting a website. You can read my full affiliate disclosure in my  privacy policy . What is the Best Cheap Web Hosting? Here are my top picks for the best cheap web hosting: 1.  Bluehost . Bluehost  is a web hosting company that hosts over 2 million domains collectively. Their initial plan starts at $2.95 per month, and you get a 30-days money-back guarantee with all the plans. Recommended web host by WordPress.org for more than a decade now, it also offers features like: A fr

Five Common iPage Email Problems and Solutions

If you’re paying for some of the popular services offered by iPage – cheap web hosting , domain names , and dedicated servers  – you’re likely using iPage email as well.  iPage is well known for its affordable pricing and user-friendly solutions. However, its services have not always been 100% reliable.  Such is the case with iPage email, which often stops working. If your email is acting up, several possible reasons exist. Read on to find out why you can’t access your iPage webmail and what you can do about it. Reasons why iPage email isn’t working  If your iPage email is not working, that’s usually because you’ve typed in the wrong password or account name or your internet connection is not strong enough. Other suspects are a blocked IP address, a poorly set up email account, and an overloaded queue.  Your IP is blocked  When you enter a wrong password 6 times in a row in under 5 minutes, iPage blocks your IP address out of precaution. You have to wait for 3 hours to reset

How to Safely Change Your WordPress Theme (Beginner’s Guide)

Learning how to change your WordPress theme seems like a very basic thing. Simply go to Appearance > Themes , hover over any of the available WordPress themes, and click Activate , right? While that is correct in principle and works well for a site that is basically empty, it gets a bit more complicated for an established website with a lot of content. In that case, it becomes more of a case of how to change your WordPress theme safely and without losing anything. And that’s exactly what will talk about here. In the following, you will learn what risks there are to changing your WordPress theme. We will talk about how to prepare for the switch, different ways of performing it, and how to check your site after you are done. Changing Your WordPress Theme: Potential Risks Before going over the how-to part, let’s first discuss why you need to be cautious when changing your WordPress theme and what things can break. First of all, you can generally relax. WordPress is built in a way