Monday, January 23, 2017

WFFM: Save to Database

Web Forms For Marketers has become one of the essential component of Sitecore. Almost every website is using forms to capture the inputs from users and it is very common scenario to get the data stored in Database for reporting purpose. Here are few easy steps which can help you storing the form's data in SQL database.


  1. Download the WFFM - SQL Provider(Save To Database) and install it in Sitecore using Installation wizard. All physical files and Sitecore items will be stored in respective location.
  2. Once installed, you will notice that it has created a new Action under System-> Modules -> Web Forms for Marketers -> Settings -> Actions -> Save Actions
  3. Now, we have to add connection string in configuration file which will help us storing the data in that database. You have to keep the name of connectionstring to 'wfm' only as same name is referred in WFFM module code.

< add connectionstring="user id=your_db_user_id;password=your_db_password;Data Source=your_db_server;Database=your_db_name" name="wfm" >

You are done.

Now add the 'Save to Database' action on any WFFM form and start using it. Also validate the database and data should start getting stored in it.

Furthermore, this module provides the capability of exporting the saved data in CSV format. We can do customization on it to export the data from different servers(CMS or CD) which I will explain in next article.


Please don't hesitate to contact me at 'email.bajaj@gmail.com' for any Sitecore related query/scenario.