The Sitecore Web Forms for Marketers module is useful for allowing non-technical users to quickly create forms that capture information and perform actions on the site. The module installs as a package and is immediately usable, but here are some suggested tweaks from the installed default.
Change the Web Form Submission Database
When a user adds a “Save to Database” action to a web form, the data will automatically be captured in a dedicated database and reported on using Forms Reporter. By default this is a file based database using SQLite. In a production environment, I would recommend converting this to a SQL Server database so that it can be shared between CD instances and so that the database can be reliably backed up with the rest of your Sitecore databases.
The App_Config/forms.config database contains a connection string for Web Forms for Marketers, but connection strings really belong in the same file. Luckily, there is a way to define the connection string in your standard ConnectionString.config file:
<add name="wfm" connectionString="user id=[user];password=[password];Data Source=[database server];Database=[database]"/>
This is really just like any other connection string in Sitecore, with a specific name of “wfm” that the tool is looking for.
Web Service Connection String
When a user adds a “Create Item” action to a form (or similar actions that alter Sitecore content), CD servers that are not confiugred to reference master will not be able to accomplish those tasks. The Web Forms for Marketers module has an option to post those changes back to the CM server using a web service.
Add the following connection string to the ConnectionStrings.config file on all content delivery servers:
<add name="remoteWfmService" connectionString="url=http://[master server]/sitecore%20modules/shell/Web%20Forms%20for%20Marketers/Staging/WfmService.asmx;user=[domain\username];password=[password];timeout=60000" />
[master server] – address of the content management server.
[domain\username] – Sitecore user (full name). The necessary access rights depend on the items that the form is using.
[password] – user’s password.
The Sitecore user you specify will need to have enough permissions to alter Sitecore in the way that has been configured in the action, but for security should not have any more permissions than necessary.
By default, the Web Forms for Marketers has very basic styling. However, there is a theme system to Web Forms for Marketers that allows you to apply your own CSS to forms. You can find a description of how to create a theme in section 3.12 of the Web Forms for Marketers Reference Guide, but here are the general steps:
- Create an item to represent the theme under: /sitecore/system/modules/Web Forms for Marketers/settings/meta data/themes
- Set the theme on the parent folder of the web form under system. The folders have a field on them to specify the theme
- Create a CSS file in the following location: /sitecore
modules/shell/web forms for marketers/themes/[Theme].css
You can transform your forms into something more user-friendly: