Click or drag to resize
FormComponentVisibilityEvaluatorIsComponentVisible Method
Evaluates VisibilityCondition of given component. If the component depends on another fields, the visibility condition is evaluated against provided visibleComponents.

Namespace: Kentico.Forms.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 12.0.0
Syntax
C#
public bool IsComponentVisible(
	FormComponent component,
	IEnumerable<FormComponent> visibleComponents
)

Parameters

component
Type: Kentico.Forms.Web.MvcFormComponent
Form component which visibility condition is evaluated.
visibleComponents
Type: System.Collections.GenericIEnumerableFormComponent
Visible form components.

Return Value

Type: Boolean
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.

Implements

IFormComponentVisibilityEvaluatorIsComponentVisible(FormComponent, IEnumerableFormComponent)
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when component or visibleComponents is null.
See Also