Table of Contents

Interface IFormComponentVisibilityEvaluator

Namespace
Kentico.Forms.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll

Defines interface for evaluator of form component visibility conditions.

public interface IFormComponentVisibilityEvaluator
Extension Methods

Methods

IsComponentVisible(FormComponent, IEnumerable<FormComponent>, IEnumerable<FormComponent>)

Evaluates VisibilityCondition of given component. If the component depends on another fields, the visibility condition is evaluated against provided visibleComponents.

bool IsComponentVisible(FormComponent component, IEnumerable<FormComponent> visibleComponents, IEnumerable<FormComponent> components)

Parameters

component FormComponent

Form component which visibility condition is evaluated.

visibleComponents IEnumerable<FormComponent>

Visible form components.

components IEnumerable<FormComponent>

Form components defined in the component properties class.

Returns

bool

true if the component is visible or visibility condition is null, otherwise false. false is also returned when visibility condition depends on another field which is not present in visibleComponents enumeration.

Exceptions

ArgumentNullException

Thrown when component or visibleComponents is null.