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.MvcAssembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax 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:
Booleantrue 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 Exception | Condition |
---|
ArgumentNullException | Thrown when component or visibleComponents is null. |
See Also