Interface IFieldGeneratorHandler<TModel, T>
A Field Generator Handler is responsible for generating the HTML for a Field Element of a particular type of field.
Namespace: ChameleonForms.FieldGenerators.Handlers
Assembly: ChameleonForms.Core.dll
Syntax
public interface 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 |
Methods
| Improve this Doc View SourceCanHandle()
Whether or not the current field can be output using this field generator handler.
Declaration
bool CanHandle()
Returns
Type | Description |
---|---|
System.Boolean |
GenerateFieldHtml(IReadonlyFieldConfiguration)
Generate the HTML for the current field's Field Element using this handler.
Declaration
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 |
GetDisplayType(IReadonlyFieldConfiguration)
The type of control the field will be displayed as.
Declaration
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 |
PrepareFieldConfiguration(IFieldConfiguration)
Modify the field configuration for the field using this field generator handler.
Declaration
void PrepareFieldConfiguration(IFieldConfiguration fieldConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IFieldConfiguration | fieldConfiguration | The field configuration to modify |