Class Field<TModel>
Wraps the output of a single form field.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ChameleonForms.Component
Assembly: ChameleonForms.dll
Syntax
public class Field<TModel> : FormComponent<TModel>, IFormComponent<TModel>, IHtmlContent, IDisposable
Type Parameters
Name | Description |
---|---|
TModel | The view model type for the current view |
Constructors
| Improve this Doc View SourceField(IForm<TModel>, Boolean, IFieldGenerator, IFieldConfiguration)
Creates a form field.
Declaration
public Field(IForm<TModel> form, bool isParent, IFieldGenerator fieldGenerator, IFieldConfiguration config)
Parameters
Type | Name | Description |
---|---|---|
IForm<TModel> | form | The form the field is being created in |
System.Boolean | isParent | Whether or not the field has other fields nested within it |
IFieldGenerator | fieldGenerator | A field HTML generator class |
IFieldConfiguration | config | The configuration values for the field |
Methods
| Improve this Doc View SourceBegin()
Returns the HTML representation of the beginning of the form component.
Declaration
public override IHtmlContent Begin()
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Html.IHtmlContent | The beginning HTML for the form component |
Overrides
ChameleonForms.Component.FormComponent<TModel>.Begin()
|
Improve this Doc
View Source
Dispose()
Called when form component is created within a using
block: writes the end tag(s) of the component.
Declaration
public override void Dispose()
Overrides
ChameleonForms.Component.FormComponent<TModel>.Dispose()
|
Improve this Doc
View Source
End()
Returns the HTML representation of the end of the form component.
Declaration
public override IHtmlContent End()
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Html.IHtmlContent | The ending HTML for the form component |
Overrides
ChameleonForms.Component.FormComponent<TModel>.End()
Implements
Microsoft.AspNetCore.Html.IHtmlContent
System.IDisposable