Tag Archives: Sitecore

Saving WFFM form data programatically in Sitecore WFFM 8.1 +

This post is applicable to this WFFM version: https://dev.sitecore.net/Downloads/Web%20Forms%20For%20Marketers/Web%20Forms%20For%20Marketers%2081/Web%20Forms%20For%20Marketers%2081%20Initial%20Version/Release%20Notes private void SaveToDatabase(ContactFormArgs args, Item blog) { try { var formId = Config.BlogConfig.GetFieldValue(“WebFormId”).ToID(); var formItem = Sitecore.Context.Database.GetItem(formId); if (formItem == null) return; var fields = formItem.Children.ToList(); var list = new List { GetField(“FirstName”, args.FirstName, fields), GetField(“LastName”, args.LastName, fields), GetField(“Email”, args.Email, fields), GetField(“Question”, args.Question, fields), GetField(“BlogName”, blog.GetTitle(), […]

WFFM required field (For disclaimer / T&C) that support custom error message in sitecore checkbox (MVC Edition)

Requirement: Stop user from submitting WFFM form when the checkbox field in the form is marked as required. Add the ability to change the “required” error message (ie: this field is required is not particularly user friendly when it comes to T&C). Tested in: WFFM Version: Web Forms for Marketers 2.4 rev. 151103 Sitecore Version: […]