Class ListHandler<TModel, T>
Generates the HTML for the Field Element of list fields as either a select list or a list of radio buttons.
Implements
Inherited Members
Namespace: ChameleonForms.FieldGenerators.Handlers
Assembly: ChameleonForms.dll
Syntax
public class ListHandler<TModel, T> : FieldGeneratorHandler<TModel, T>, IFieldGeneratorHandler<TModel, T>
Type Parameters
Name | Description |
---|---|
TModel | The type of the model the form is being output for |
T | The type of the property in the model that the specific field is being output for |
Constructors
| Improve this Doc View SourceListHandler(IFieldGenerator<TModel, T>)
Constructor for the List Field Generator Handler.
Declaration
public ListHandler(IFieldGenerator<TModel, T> fieldGenerator)
Parameters
Type | Name | Description |
---|---|---|
IFieldGenerator<TModel, T> | fieldGenerator | The field generator for the field |
Methods
| Improve this Doc View SourceCanHandle()
Whether or not the current field can be output using this field generator handler.
Declaration
public override bool CanHandle()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GenerateFieldHtml(IReadonlyFieldConfiguration)
Generate the HTML for the current field's Field Element using this handler.
Declaration
public override IHtmlContent GenerateFieldHtml(IReadonlyFieldConfiguration fieldConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IReadonlyFieldConfiguration | fieldConfiguration | The field configuration to use to generate the HTML |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Html.IHtmlContent | The HTML for the Field Element |
Overrides
GetDisplayType(IReadonlyFieldConfiguration)
The type of control the field will be displayed as.
Declaration
public override FieldDisplayType GetDisplayType(IReadonlyFieldConfiguration fieldConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IReadonlyFieldConfiguration | fieldConfiguration | The configuration for the field |
Returns
Type | Description |
---|---|
FieldDisplayType | The display type of the field control |
Overrides
PrepareFieldConfiguration(IFieldConfiguration)
Modify the field configuration for the field using this field generator handler.
Declaration
public override void PrepareFieldConfiguration(IFieldConfiguration fieldConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IFieldConfiguration | fieldConfiguration | The field configuration to modify |