Monday, September 21, 2015

Sitecore Web Forms for Marketers Overview and how-to guide

Most web sites on the internet will have some sort of form available for users; from a simple form that accepts an email address to subscribe to a newsletter all the way through to a large data entry form with complex business rules and logic. Setting up the web form and making any modifications will often require developers time and code deployments, something which is not ideal in the fast-paced and often responsive world of marketing. Sitecore has an innovative approach to online forms with it's free Web Forms for Marketers module.

The module empowers content editors to create their own web forms, choose a form action (such as emailing the data to an address), then display the form on the desired page(s), ready for users to complete. The form creation process follows a simple user interface that requires minimal training, adding the form to a page is the same process that content authors will be familiar with, and the number of form save actions should meet most business requirements with no custom development time.

The form creation interface

Once you create a form in the content tree, you have the option to open the form designer. This is the area where the form elements are created and general settings such as: title, introduction and footer are set. There is also the option to export the form to ascx (which developers can use to bring the form into custom code without having to redo the form manually). 

Web Forms for Marketers ribbon

There are many different field types which can be added to the form, such as simple text, or more complex types like email or phone number which have pre-defined validation. The list types such as Drop List or List Box allow a data source off of the content tree, which allows for selections from existing content (this could be custom categories for example, or even business departments).

Web Forms for Marketers field types

Validation can also be manually applied to any field on the web form, the default validation types include: numbers only. letters only, special characters must be included, number and special character and email address. With custom validation you have the option to use a regular expression (which allows you to validate on a custom pattern), an example of this would be a member number or ID which would have format and length governed by business logic.

Web Forms for Marketers form designer example
In the form designer example above, I have created a simple contact form. It accepts a first/last name, email address and user comments. Key fields are set to be required and the email address is set to the email form (which includes validation by default).

The form Save Actions

Once the interface of the form is designed, the save actions need to be set so that the data entered into the form actually goes somewhere. The following save actions are currently available out of the box in Web Forms for Marketers:
  • Add the contact to a contact list
  • Change Password
  • Enroll in Engagement Plan
  • Update Contact Details
  • Create Item
  • Create User
  • Edit Role Membership
  • Logout
  • User Login
  • User Login with Password
  • Send Email Campaign Message
  • Send Email Message
  • Send MMS
  • Send SMS
  • Tell a Friend
  • Register a Conversion
  • Register a Campaign
It is also possible to select any number of these save actions into the same form. One example of this may be registering a user and then enrolling them into an engagement plan. 

Web Forms for Marketers save actions

Each save action can also have a custom error message displayed on fail, this is good because it allows for granular error messages for key and non-key save actions. 

Web Forms for Marketers save actions error messages

For the contact form example above (in the form designer section), I am simply going to set the save action to Send Email Message. Once the save action has been added, the edit button needs to be clicked to configure that action. 

Web Forms for Marketers save actions configuration

The configuration for each save action is different, in the send email example we simply set the email options and the message itself. The field values are entered into the message using the insert field option and appear [Like So].

There is also a global configuration that needs to be setup for some of the save actions. Sending an email message for example requires email server details (SMTP) to actually send the mail. In this case, the configuration is set at: /sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions/Send Email Message. The important field to set here is Parameters - which should contain valid mail server details.

Adding the form to a page

Once a form is created, it can be added to a page (and even multiple pages) by using the Form (or MVC Form) rendering. These renderings are added to Sitecore when Web Forms for Marketers is installed and are available at: /sitecore/layout/Renderings/Modules/Web Forms for Marketers.

As content editors will be familiar with, the rendering can be added to any of the allowed placeholders via the content editor or page editor.

In the control properties window of the Form rendering, simply select the form created earlier. Once a publish is complete, the form should appear on the nominated page.


Web Forms for Marketers is a powerful module, that enables end-users to have complete control over forms used on a Sitecore site. It takes away the need for developer time and deployment, and allows content editors and marketers to respond to their needs right away, in a secure manner. 

As the how-to guide above shows, it's a simple process that will make sense and be easy to follow for users already familiar with Sitecore's content editing interface. It already comes ready with many save actions on the forms (for both simple and more advanced tasks), however like anything Sitecore, it's always possible to extend Web Forms for Marketers to meet any complex business needs.

No comments:

Post a Comment