Class FormComponentDefinition
Definition of a registered form component.
public class FormComponentDefinition : ComponentDefinitionBase, IFormBuilderDefinition, IComponentDefinition
- Inheritance
-
objectFormComponentDefinition
- Implements
- Inherited Members
- Extension Methods
Constructors
FormComponentDefinition(string, Type, string)
Initializes a new instance of the ComponentType class using given identifier, form component type and name.
public FormComponentDefinition(string identifier, Type formComponentType, string name)
Parameters
identifier
stringUnique identifier of the form component.
formComponentType
TypeType of the form component.
name
stringName of the form component.
Exceptions
- ArgumentException
Specified
identifier
is null, an empty string or identifier does not specify a valid code name.-or-
Specified
formComponentType
does not inherit FormComponent<TProperties, TValue>, is an abstract type or is a generic type which is not constructed.-or-
Specified
name
is null or an empty string.- ArgumentException
Thrown when
formComponentType
is null.
Properties
ComponentType
Gets the type of the form component. The type inherits FormComponent<TProperties, TValue>.
public Type ComponentType { get; }
Property Value
- Type
Description
Gets or sets the description of the form component.
public string Description { get; set; }
Property Value
- string
FormComponentPropertiesType
Gets type of the form component's properties. The type inherits FormComponentProperties.
public Type FormComponentPropertiesType { get; }
Property Value
- Type
IconClass
Gets or sets icon CSS class of the form component.
public string IconClass { get; set; }
Property Value
- string
IsAvailableInFormBuilderEditor
Determines if the form component can be added via Form builder UI to a form. Set to false to allow the component to be used programmatically only. True by default.
public bool IsAvailableInFormBuilderEditor { get; set; }
Property Value
- bool
IsMappableToContactFields
Determines if the form component can mapped to contact fields. Set to false to hide the 'Mapped to contact attribute' field in component properties dialog. True by default if the form component is available in Form builder (IsAvailableInFormBuilderEditor).
public bool IsMappableToContactFields { get; init; }
Property Value
- bool
ValueType
Gets form component's value type.
public Type ValueType { get; }
Property Value
- Type
ViewName
Gets or sets the name of the view to render.
public string ViewName { get; set; }
Property Value
- string
Remarks
If not set default location is used ("FormComponents/_{Identifier}").