One of the efforts I’m making on this site is to make it easier for visitors to request assistance. We have a manned chatbot that prompts our users, but sometimes that’s a bit too intrusive. We have a contact form in our footer, but that’s often too general. What I really needed was a lead collection form that I could put in virtually any article that pertains to our company or my partners so that I can pass along the lead to our business development team.
You may have noticed that I did this in the last article about Sendoso. At the end of the article, I have the lead form where I can collect any leads looking to demo the product or connect with their sales team. At issue is that I have dozens of partners like this… so the last thing I want to do is build dozens of forms in WordPress and then track and forward them all.
Formidable Forms
Instead, using Formidable Forms, I built a single form and used a hidden field where I can dynamically populate who the partner is. Formidable has a ton of different options for their platform – from calculated fields, to default values, to capturing querystrings, etc. In this case, though, I want to specify the value of the hidden field – called partner – to the name of the partner. That way I can collect all leads in a single location as well as differentiate the partner they’re seeking out.
This is accomplished in three steps:
- Build a hidden field into the form that can be populated.
- Set the default value of the hidden field to capture the value.
- Dynamically populate the hidden field with the value passed in the form shortcode.
Additionally, this enables me to include the partner name on the email notification that I receive as well since it’s a captured data element on the form.
Step 1: Build a Hidden Field Into the Form
The first step is to drag the hidden field onto the form and build the remaining fields. I’m also including a hCaptcha to avoid bot submissions.
Step 2: Add A Parameter To Capture The Value Of The Hidden Field
The next step is to click Advanced on the hidden field options and enter the parameter that I wish to capture as the default value. This is done with a simple shortcode:
[get param=partner]
You can call this parameter anything you’d like, but you’ll have to be sure to use the exact parameter name in the next step when you create your Shortcode to embed the form.
Step 3: Add The Parameter to the Formidable Shortcode
To embed your form, you can click the Embed link in the top right of the form builder and you’ll get the shortcode. In this case, it’s:
[formidable id="25"]
To auto-populate that hidden field, I can modify the shortcode and insert the parameter and its value:
[formidable id="25" partner="Sendoso"]
Here’s how that looks with the Gutenberg editor:
Now, when the form is viewed, the hidden field is populated with the value. Not only that but it’s also passed and stored in the Formidable Entries for that form. I can then add that field to the email notifications as well so that when I get a lead, my subject line is Partner Lead for Sendoso.
Now I can use this same form throughout my articles for multiple partners to capture their lead and forward it to the appropriate person. Of course, this doesn’t just have to be specific to partners… you could use it for different services, products, brands, etc. that you may be promoting on your site.
Formidable Forms is one of our recommended plugins for WordPress since it’s incredibly flexible and also doesn’t add a ton of extraneous code that slows down our site. They even have an import mechanism if you’re utilizing another form plugin.