February 26, 2016

Create Custom Condition in Sitecore WFFM

Sample code snippet to create custom condition in Sitecore WFFM

public class CustomCondition<T> : StringOperatorCondition<T> where T : RuleContext
   
{

       
public string FieldName
       
{

            get
;
            set
;
       
}
       
public string Value
       
{

            get
;
            set
;
       
}
       
protected override bool Execute(T ruleContext)
       
{
           
if (Condition > 0)
           
{
               
return true;
           
}
           
return false;
       
}
   
}  

No comments:

Post a Comment