Click or drag to resize
IEnumerableExtensions.GetDisplayedComponents Method
Returns filtered components which will be displayed in form based on given parameters.

Namespace: Kentico.Forms.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 12.0.0
Syntax
C#
public static IEnumerable<FormComponent> GetDisplayedComponents(
	this IEnumerable<FormComponent> components,
	ContactInfo contact,
	BizFormInfo formInfo,
	BizFormItem formItem,
	IFormComponentVisibilityEvaluator visibilityEvaluator
)

Parameters

components
Type: System.Collections.Generic.IEnumerable<FormComponent>
Original collection of components.
contact
Type: CMS.ContactManagement.ContactInfo
Contact for which the filter is performed, can be null.
formInfo
Type: CMS.OnlineForms.BizFormInfo
Form representation.
formItem
Type: CMS.OnlineForms.BizFormItem
Existing form item, can be null.
visibilityEvaluator
Type: Kentico.Forms.Web.Mvc.IFormComponentVisibilityEvaluator
Form component visibility evaluator.

Return Value

Type: IEnumerable<FormComponent>
Filtered components.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<FormComponent>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also