Show / Hide Table of Contents

    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 Source

    CanHandle()

    Whether or not the current field can be output using this field generator handler.

    Declaration
    bool CanHandle()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    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

    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.