Incorrect data is saved for list fields in WFFM MVC


Description

While using list fields in the Web Forms for Marketers module on MVC layouts, the field values may be saved as empty string or contain a type name:

System.Collections.Generic.List`1[System.String]

Incorrect values may also be shown in the message text, when using list field values in the Send Email Message save action.

This issue is applied to WFFM 2.4 rev. 140117 - 2.4 rev. 141008 versions.

Solution

For Sitecore CMS 7.2:

  1. Put the Sitecore.Support.424929.dll file from the archive into the \bin folder.
  2. Navigate to the /sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types/List Types/Drop List item in your Master database and replace the MVC Type field value with the following string:
  3. Sitecore.Support.Forms.Mvc.Models.Fields.DropListField,Sitecore.Support.424929
  4. Publish the item.

For Sitecore XP 7.5–8.0:

  1. Download an archive that corresponds to your WFFM module version:
  2.     For WFFM 2.5 (all revisions), 8.0 rev. 141217, 8.0 rev. 150224: Sitecore.Support.425353.

        For WFFM 8.0 rev. 150429, 8.0 rev. 150625: Sitecore.Support.425353.

  3. Extract the Sitecore.Support.425353.dll assembly and put it into the \bin folder.
  4. Modify the \Website\Views\Form\EditorTemplates\DropListField.cshtml file:
  5. Replace the following line:
    @model Sitecore.Forms.Mvc.Models.Fields.DropListField
    With this one:
    @model Sitecore.Support.Forms.Mvc.Models.Fields.DropListField
  6. Modify the /Website/Views/Form/EditorTemplates/ListBoxField.cshtml file
  7. Replace the following line:
    @Sitecore.Forms.Mvc.Models.Fields.ListBoxField
    With this line:
    @Sitecore.Support.Forms.Mvc.Models.Fields.ListBoxField
  8. Navigate to the /sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types/List Types/Drop List item in your Master database and set its MVC Type field value to 
  9. Sitecore.Support.Forms.Mvc.Models.Fields.DropListField,Sitecore.Support.425353
  10. Navigate to the /sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types/List Types/List Box item in your Master database and set its MVC Type field value to 
  11. Sitecore.Support.Forms.Mvc.Models.Fields.ListBoxField, Sitecore.Support.425353
  12. Navigate to the /sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types/List Types/Radio List item in your Master database and set its MVC Type field value to 
  13. Sitecore.Support.Forms.Mvc.Models.Fields.RadioListField,Sitecore.Support.425353
  14. Publish the changes.