Web developers wiki ASP.NET Sitecore Sharepoint Kentico by Evident Interactive

Webforms for Marketers: Add custom Action

Modified: 2009/07/20 14:19 by jim - Categorized as: Sitecore
To extend on the basic actions that are shipped with Web Forms for Marketers module do the following:

- Implement the ISubmit interface:

public class WfmConfirmEmail : ISubmit

    public void Submit(Sitecore.Data.ID formid, Sitecore.Form.Core.Client.Data.Submit.AdaptedResultList fields)
    {
       StringBuilder sb = new StringBuilder();
       foreach (AdaptedControlResult resultItem in fields)
       {
           // FieldName == Title (not really but almost, 
           // multi language u will have to use the resultItem.FieldID to get the Title in the CurrentLanguage)
           sb.AppendLine("<b>" + resultItem.FieldName + ": </b>" + resultItem.Value + "<br/>");
       }
       // do something interesting with the sb.
    }

 © Evident Interactive BV