Last active
August 29, 2015 14:21
-
-
Save JRondeau16/5e6ad252ef3da960a9e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Sitecore.Data.Items; | |
using Sitecore.Forms.Mvc.Attributes; | |
using Sitecore.Forms.Mvc.Controllers.ModelBinders.FieldBinders; | |
using Sitecore.Forms.Mvc.Models.Fields; | |
using Sitecore.Forms.Mvc.Validators; | |
namespace MyProject.Integration.Wfm | |
{ | |
public class TermsAgreementField : CheckBoxField | |
{ | |
public string TermsLabel { get; set; } | |
[DynamicRequired("IsRequired", ErrorMessage = "The {0} field is required.")] | |
[PropertyBinder(typeof(CheckboxFieldValueBinder))] | |
public override object Value { get; set; } | |
public override bool IsRequired | |
{ | |
get { return true; } | |
} | |
public TermsAgreementField(Item item) : base(item) {} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment