Show / Hide Table of Contents

    Interface IFieldGenerator

    Generates the HTML for a single form field.

    Namespace: ChameleonForms.FieldGenerators
    Assembly: ChameleonForms.Core.dll
    Syntax
    public interface IFieldGenerator

    Properties

    | Improve this Doc View Source

    Metadata

    The metadata for the form field.

    Declaration
    ModelMetadata Metadata { get; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata
    | Improve this Doc View Source

    Template

    The form template that will be used to render the form.

    Declaration
    IFormTemplate Template { get; }
    Property Value
    Type Description
    IFormTemplate

    Methods

    | Improve this Doc View Source

    GetFieldHtml(IFieldConfiguration)

    Creates the HTML for the field control after preparing the given field configuration.

    Declaration
    IHtmlContent GetFieldHtml(IFieldConfiguration fieldConfiguration)
    Parameters
    Type Name Description
    IFieldConfiguration fieldConfiguration
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The HTML for the field control

    | Improve this Doc View Source

    GetFieldHtml(IReadonlyFieldConfiguration)

    Creates the HTML for the field control.

    Declaration
    IHtmlContent GetFieldHtml(IReadonlyFieldConfiguration fieldConfiguration)
    Parameters
    Type Name Description
    IReadonlyFieldConfiguration fieldConfiguration
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The HTML for the field control

    | Improve this Doc View Source

    GetFieldId()

    Returns the id of the field being generated.

    Declaration
    string GetFieldId()
    Returns
    Type Description
    System.String

    The id

    | Improve this Doc View Source

    GetLabelHtml(IFieldConfiguration)

    Creates the HTML for the field label after preparing the given field configuration.

    Declaration
    IHtmlContent GetLabelHtml(IFieldConfiguration fieldConfiguration)
    Parameters
    Type Name Description
    IFieldConfiguration fieldConfiguration
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The HTML for the field label

    | Improve this Doc View Source

    GetLabelHtml(IReadonlyFieldConfiguration)

    Creates the HTML for the field label.

    Declaration
    IHtmlContent GetLabelHtml(IReadonlyFieldConfiguration fieldConfiguration)
    Parameters
    Type Name Description
    IReadonlyFieldConfiguration fieldConfiguration
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The HTML for the field label

    | Improve this Doc View Source

    GetValidationHtml(IFieldConfiguration)

    Creates the HTML for the field's validation messages after preparing the given field configuration.

    Declaration
    IHtmlContent GetValidationHtml(IFieldConfiguration fieldConfiguration)
    Parameters
    Type Name Description
    IFieldConfiguration fieldConfiguration
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The HTML for the field's validation messages

    | Improve this Doc View Source

    GetValidationHtml(IReadonlyFieldConfiguration)

    Creates the HTML for the field's validation messages

    Declaration
    IHtmlContent GetValidationHtml(IReadonlyFieldConfiguration fieldConfiguration)
    Parameters
    Type Name Description
    IReadonlyFieldConfiguration fieldConfiguration
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The HTML for the field's validation messages

    | Improve this Doc View Source

    PrepareFieldConfiguration(IFieldConfiguration, FieldParent)

    Turns the given IFieldConfiguration into a FieldConfiguration ready to use for generating the form field.

    Declaration
    IReadonlyFieldConfiguration PrepareFieldConfiguration(IFieldConfiguration fieldConfiguration, FieldParent fieldParent)
    Parameters
    Type Name Description
    IFieldConfiguration fieldConfiguration

    The field configuration to modify

    FieldParent fieldParent

    The parent component of the field

    Returns
    Type Description
    IReadonlyFieldConfiguration

    The readonly field configuration; ready for generating the form field

    Extension Methods

    HtmlAttributesExtensions.ToHtmlAttributes(Object)
    • Improve this Doc
    • View Source
    Back to top © Copyright 2012-2020 MRCollective, Rob Moore, Matt Davies and the contributors to ChameleonForms.