Web Forms for Marketers 2.5 - SQL PROVIDER (SaveToDatabase)

  0 rating
11/24/2014 9:33:17 AM
4/17/2015 1:39:59 PM
Source: GitHub
Provider: blog.coates.dk


WFFM 2.5 only supports the use of xDB (MongoDB) to store submitted form data, whilst I believe MongoDB is a much better choice for storing non-structured data, there are unfortunately a number of websites that want to upgrade to 7.5 but they are not ready to use MongoDB.

So the intention of this module is to allow sitecore solutions to continue with their existing WFFM  SQL database using the SaveToDatabase action, until they move to MongoDB.

The module provides the following simple functionality

  1. Save from data to existing WFFM SQL Database
  2. Retrieve all submitted data for a given form via API
  3. The ability to download the data for a given form as an Excel spreadsheet from within the Sitecore client.
  4. Specify the delimiter to be used to separate the columns in the CSV file
  5. Define a date range for which entries to export

Source Code: github.com/TakeitEasyAlan/WFFM-SQL-Server-SaveToDatabase

For more detailed information please refer to SQL Provider article @ blog.coates.dk


  • Documentation > Installation

    Install the WFFM.SQLServer.SaveToDatabase-1.0.zip package.

    Ensure that the setting WFM.ConnectionString in /app_config/include/Sitecore.Forms.config is set to the name of the connection string for the WFFM SQL database i.e.

    <setting name="WFM.ConnectionString" value="wfm" />

    where the connection is defined as

      <add name="wfm" connectionString="user id=[USER ID];password=[password];Data Source=[Server];Database=[WFM DATABASE];Connect Timeout=30" />

    The command class that exports the CSV, is bound by the command below:

    <command name="forms:exportformdata" type="WFFM.SQLServer.SaveToDatabase.Infrastructure.Commands.ExportFormDataCommand, WFFM.SQLServer.SaveToDatabase" />

    You do not have to add a command item to the /app_config/commands.config file as the latest version (1.4) has a WFFM.SQLServer.SaveToDatabase.config include file to define the command.
    The following setting  defines the delimiter to be used to separate the columns in the CSV file:

          <setting name="WFFM.SQLServer.SaveToDatabase.CsvDelimiter" value=";" />

    The following setting defines if the user can enter a date range to limit the export, or if it automatically exports all data, if true the user can select a date range:

          <setting name="WFFM.SQLServer.SaveToDatabase.ExportOptions" value="true" />

  • Documentation > How to use
    How to use

    Like previous version of WFFM you use the "Save To Database" action to save the form data to the SQL database.

    The save action is still /sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions/Save to Database, in fact it is the same item from previous versions, just with that the class is changed to


    If you want to get all the data saved for a specific form you have to create the WFFM.SQLServer.SaveToDatabase.Model.FormReposiotry class, and call the Get(ID formId) function, which will return a list IForm entries.

    For more detailed information please refer to SQL Provider article on blog.coates.dk

  • Documentation > Limitations
    Save to database does not add data to the pool table[No text in field]
Release notes
Version 1.1 released
Read more Back
Code examples

Solution screenshots(0)


Reviews (0)

Sort by: Date Most votes
  • Profile Avatar

    Level: 0

    x0 x0 x0




    Was this helpful?


Comments (0)

Sort by: Date  Most votes

Leave a Comment

Comment must be field in
Post comment

Write a review

Title can't be empty
Review can't be empty
Post review


Title Description Download Action

Add File