sitecore

Web Forms For Marketeers (WFFM)

Introduction#

Web Forms For Marketeers is the popular Sitecore module that allows to create forms in Sitecore and customize and extend their behavior using save actions.

More information about the module can be found in https://dev.sitecore.net/Downloads/Web_Forms_For_Marketers.aspx

Submit the WFFM form programmatically

This example shows how to submit the WFFM form in code.

var controlResults = new List<ControlResult>();
controlResults.Add(new ControlResult(Pdf_Request_Form.Name.ItemID.ToString(), "Name", name, string.Empty));
controlResults.Add(new ControlResult(Pdf_Request_Form.Email.ItemID.ToString(), "Email", email, string.Empty));    
FormDataHandler.ProcessData(Pdf_Request_Form.ItemID, controlResults.ToArray(), new IActionDefinition[] {}, DependenciesManager.ActionExecutor);

This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow