Interface IFieldGenerator<TModel, T>
Generates the HTML for a single form field.
Inherited Members
Namespace: ChameleonForms.FieldGenerators
Assembly: ChameleonForms.Core.dll
Syntax
public interface IFieldGenerator<TModel, T> : IFieldGenerator
Type Parameters
Name | Description |
---|---|
TModel | |
T |
Properties
| Improve this Doc View SourceFieldProperty
The expression that identifies the property in the model being output.
Declaration
Expression<Func<TModel, T>> FieldProperty { get; }
Property Value
Type | Description |
---|---|
System.Linq.Expressions.Expression<System.Func<TModel, T>> |
HtmlHelper
A HTML helper for the model.
Declaration
IHtmlHelper<TModel> HtmlHelper { get; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel> |
Methods
| Improve this Doc View SourceGetCustomAttributes()
Returns any custom attributes against the field being generated.
Declaration
IEnumerable<Attribute> GetCustomAttributes()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Attribute> | The attributes |
GetFieldDisplayName()
Returns the displayable name of the field being generated.
Declaration
string GetFieldDisplayName()
Returns
Type | Description |
---|---|
System.String | The id |
GetModel()
Returns a model with the current values for the form.
Declaration
TModel GetModel()
Returns
Type | Description |
---|---|
TModel | The current model |
GetValue()
Returns the current value of the field.
Declaration
T GetValue()
Returns
Type | Description |
---|---|
T | The current field value |