Blog

Leveraging Hidden Form Fields in Sitefinity for Marketo and other CRM tools

October 28, 2014   /   by  Chris Aybar

How to Extend the Sitefinity Forms Control by Using Hidden Form Fields

You are feeling the pressure to generate more and more leads. But in order to do that, you need more data and better customer intelligence.

It’s not just enough to know basic web analytics. General traffic data and basic behavioral statistics are not going to get you the results you need.

Basic web analytics assume that the conversion process is a series of linear steps:

  1. The recipient sees a campaign (banner ad, email, or social content, etc.).
  2. The recipient visits the landing page (click-through rate).
  3. The visitor converts (conversion rate).

But it’s rarely this straightforward. Instead, web visitors bounce around the Internet like a ping pong ball. Chances are they received your email, saw your social media content, clicked on your remarketing banner ad and visited your landing page a handful of times before completing the form.

So which one actually led them to conversion?

Simple click-through rates and conversion rates don’t give us that level of insight. These stats only tell us half the story – and as digital marketers, part of our job is figuring out the other half.

Tracking the entire lifecycle of a customer is one of the biggest challenges that modern day marketers face. Marketing automation tools like Marketo have helped us tremendously. They allow us to track behavior at the individual lead level across your entire web site and marketing initiatives. It’s ingenius!

And one of the most useful features is adding hidden form fields in Progress Sitefinity to your landing pages.

What is a Hidden Form Field and How is it Used on a Lead Generation Form?

Imagine that you want to collect data about a customer, but you don’t want them to know about it. Not because it’s sneaky or wrong, but because it’s just not important to them. Rather than distract them with useless details about their conversion experience, like a source code, campaign type, or other UTM tracking code, the hidden form fields feature allows you to hide those data fields from the visitor.

When the user submits the form with their name, email, and other details, the data from the hidden form fields is also submitted as a part of that data record.

It’s an incredibly useful tool that gives marketers deeper insight into the conversion process for each lead. Genius, really!

So, you can imagine how disappointed we were to find out that integrating Sitefinity CMS with Marketo marketing automation tool lacked this critical feature. We just had to fix it.

Sitefinity Banner

Setting Up Our Test

Integrating Sitefinity CMS with Marketo Marketing Automation Tool

Just recently, we were engaged to design and develop a streamlined process for capturing leads in Sitefinity CMS and saving them into the client’s marketing automation tool, Marketo. So this seemed like the perfect opportunity to solve the hidden form fields problem, once and for all.

As a Sitefinity partner and certified developer, we have been asked to customize this easy-to-use .NET content management system many times before. Often times, that means we must create a new Sitefinity module or widget (commonly referred to as user controls) in order to enhance the client’s marketing efforts.

But in this case, Sitefinity has done a lot of the hard work already. The system has a built-in Sitefinity Forms Module, and a very convenient Sitefinity Marketo Connector that allows for easy integration between the two systems.

Therefore, we created our first proof of concept by setting up the Sitefinity Marketo Connector, and then creating a simple test form with Sitefinity fields mapped to known Marketo fields. We wanted to include some hidden form fields for campaign type, landing page type and source code. Before submitting any test submissions, it was clear that a hidden form field widget was not available.

hidden-field

Solving the Problem

Enhancing the Sitefinity Forms Module to Allow for Hidden Form Fields

To solve this problem, we asked ourselves some very basic questions about the feasibility of implementing this seemingly rudimentary, but desirable feature:

  1. Is it possible to add a hidden form field to the lead capture form?
  2. Is it possible to capture and store that campaign data with the lead data when the form is submitted.
  3. Could this be accomplished by simply extending the Sitefinity Forms module by creating a new form widget?
  4. And, is it possible to pre-fill the hidden form fields with pertinent campaign data?

Indeed, we found all the necessary underpinnings to make this a reality.

First, we created a new hidden form widget, whose value we could set from within the Sitefinity Form designer. Second, Sitefinity automatically takes care of storing the lead data captured by hidden fields.

And voila…the hidden form fields feature started working like a charm.

To accomplish pre-filling hidden fields dynamically, however, we extended the existing Sitefinity Forms control class by simply overriding the necessary methods to allow the form to pre‐populate hidden fields with necessary campaign data before page rendering was complete. So, by extending the existing Sitefinity Forms control class we were able to replace the default Sitefinity Form toolbox widget with a “Smarter” version that automatically pre‐populates all lead capture hidden form fields when necessary.

Implementing the Solution

The Code to Extend the Sitefinity Forms module to Allow for Hidden Form Fields

Implementing our solution to extend the Sitefinity Forms module to allow for hidden form fields is easy. You can download the custom code here. This sample contains just the code for the hidden form widget to allow Sitefinity administrators to add hidden fields to Sitefinity forms.

[Note: Sitefinity has come out with a number of new updates since we posted this blog post, so if you have any issues implementing the custom code, or need any help with Sitefinity, we're here for you. Let's Talk.]

Chris Aybar

Chris Aybar

Chief Technology Officer

In addition to serving as Roger West’s CTO, Chris is the agency’s secret weapon when it comes to implementing custom-coded solutions, open-source content management systems, or any other technical challenge our clients face. He loves using technology to help people and finding ways to make the seemingly impossible happen.