Click or drag to resize
IFormComponentVisibilityEvaluatorIsComponentVisible 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: 13.0.131
Syntax
C#
bool IsComponentVisible(
	FormComponent component,
	IEnumerable<FormComponent> visibleComponents,
	IEnumerable<FormComponent> components
)

Parameters

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

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.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when component or visibleComponents is null.
See Also