Show / Hide Table of Contents

    Class FieldConfiguration

    Holds configuration data for a form field.

    Inheritance
    System.Object
    FieldConfiguration
    Implements
    IFieldConfiguration
    Microsoft.AspNetCore.Html.IHtmlContent
    IReadonlyFieldConfiguration
    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.Config
    Assembly: ChameleonForms.Core.dll
    Syntax
    public class FieldConfiguration : IFieldConfiguration, IHtmlContent, IReadonlyFieldConfiguration

    Constructors

    | Improve this Doc View Source

    FieldConfiguration()

    Constructs a field configuration.

    Declaration
    public FieldConfiguration()

    Properties

    | Improve this Doc View Source

    AppendedHtml

    A list of HTML to be appended to the form field in ltr order.

    Declaration
    public IEnumerable<IHtmlContent> AppendedHtml { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Html.IHtmlContent>
    | Improve this Doc View Source

    Attributes

    Attributes to add to the form element's HTML.

    Declaration
    public HtmlAttributes Attributes { get; }
    Property Value
    Type Description
    HtmlAttributes
    | Improve this Doc View Source

    Bag

    A dynamic bag to allow for custom extensions using the field configuration.

    Declaration
    public dynamic Bag { get; }
    Property Value
    Type Description
    System.Object
    | Improve this Doc View Source

    DisplayType

    Returns the display type for the field.

    Declaration
    public FieldDisplayType DisplayType { get; }
    Property Value
    Type Description
    FieldDisplayType
    | Improve this Doc View Source

    EmptyItemHidden

    Whether or not the empty item is hidden.

    Declaration
    public bool EmptyItemHidden { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    ExcludedEnums

    Enum value(s) to exclude from the generated field.

    Declaration
    public Enum[] ExcludedEnums { get; }
    Property Value
    Type Description
    System.Enum[]
    | Improve this Doc View Source

    FalseString

    The label that represents false.

    Declaration
    public string FalseString { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    FieldContainerClasses

    Any CSS class(es) to use for the field container element.

    Declaration
    public string FieldContainerClasses { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    FieldHtml

    The HTML to be used as the field html.

    Declaration
    public IHtmlContent FieldHtml { get; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    | Improve this Doc View Source

    FormatString

    The format string to use for the field.

    Declaration
    public string FormatString { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    HasInlineLabel

    Whether or not to use an inline <label>.

    Declaration
    public bool HasInlineLabel { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    HasLabelElement

    Whether or not to use a <label>.

    Declaration
    public bool HasLabelElement { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Hint

    Get the hint to display with the field.

    Declaration
    public IHtmlContent Hint { get; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    | Improve this Doc View Source

    HintId

    The ID to use for a field hint.

    Declaration
    public string HintId { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    HtmlAttributes

    Attributes to add to the form element's HTML.

    Declaration
    public IDictionary<string, object> HtmlAttributes { get; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.Object>
    | Improve this Doc View Source

    InlineLabelText

    Gets any text that has been set for an inline label.

    Declaration
    public IHtmlContent InlineLabelText { get; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    | Improve this Doc View Source

    LabelClasses

    Any CSS class(es) to use for the field label.

    Declaration
    public string LabelClasses { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    LabelText

    Gets any text that has been set for the label.

    Declaration
    public IHtmlContent LabelText { get; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    | Improve this Doc View Source

    NoneString

    The label that represents none.

    Declaration
    public string NoneString { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    PrependedHtml

    A list of HTML to be prepended to the form field in ltr order.

    Declaration
    public IEnumerable<IHtmlContent> PrependedHtml { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Html.IHtmlContent>
    | Improve this Doc View Source

    ShouldInlineLabelWrapElement

    Whether or not inline <label> should wrap their <input> element.

    Declaration
    public bool ShouldInlineLabelWrapElement { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    TrueString

    The label that represents true.

    Declaration
    public string TrueString { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    ValidationClasses

    Any CSS class(es) to use for the field validation message.

    Declaration
    public string ValidationClasses { get; }
    Property Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    AddClass(String)

    Adds a CSS class (or a number of CSS classes) to the attributes.

    Declaration
    public IFieldConfiguration AddClass(string class)
    Parameters
    Type Name Description
    System.String class

    The CSS class(es) to add

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    AddFieldContainerClass(String)

    Specify one or more CSS classes to use for the field container element.

    Declaration
    public IFieldConfiguration AddFieldContainerClass(string class)
    Parameters
    Type Name Description
    System.String class

    Any CSS class(es) to use for the field container element

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    AddLabelClass(String)

    Specify one or more CSS classes to use for the field label.

    Declaration
    public IFieldConfiguration AddLabelClass(string class)
    Parameters
    Type Name Description
    System.String class

    Any CSS class(es) to use for the field label

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    AddValidationClass(String)

    Specify one or more CSS classes to use for the field validation message.

    Declaration
    public IFieldConfiguration AddValidationClass(string class)
    Parameters
    Type Name Description
    System.String class

    Any CSS class(es) to use for the field validation message

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Append(IHtmlContent)

    Appends the given HTML to the form field.

    Declaration
    public IFieldConfiguration Append(IHtmlContent html)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Html.IHtmlContent html

    The HTML to append

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Append(Func<Object, IHtmlContent>)

    Appends the given HTML to the form field.

    Declaration
    public IFieldConfiguration Append(Func<dynamic, IHtmlContent> html)
    Parameters
    Type Name Description
    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> html

    The HTML to append as a templated razor delegate

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Append(String)

    Appends the given string to the form field.

    Declaration
    public IFieldConfiguration Append(string str)
    Parameters
    Type Name Description
    System.String str

    The string to prepend

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    AsCheckboxList()

    Renders the field as a list of radio options for selecting single values or checkbox items for selecting multiple values. Use for a list or boolean value.

    Declaration
    public IFieldConfiguration AsCheckboxList()
    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    See Also
    AsRadioList()
    | Improve this Doc View Source

    AsDropDown()

    Renders the field as a drop-down control. Use for a list or boolean value.

    Declaration
    public IFieldConfiguration AsDropDown()
    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    AsRadioList()

    Renders the field as a list of radio options for selecting single values or checkbox items for selecting multiple values. Use for a list or boolean value.

    Declaration
    public IFieldConfiguration AsRadioList()
    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    See Also
    AsCheckboxList()
    | Improve this Doc View Source

    Attr(Func<Object, Object>)

    Adds or updates a HTML attribute with using a lambda method to express the attribute.

    Declaration
    public IFieldConfiguration Attr(Func<object, object> attribute)
    Parameters
    Type Name Description
    System.Func<System.Object, System.Object> attribute

    A lambda expression representing the attribute to set and its value

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Attr(String, Object)

    Adds or updates a HTML attribute with a given value.

    Declaration
    public IFieldConfiguration Attr(string key, object value)
    Parameters
    Type Name Description
    System.String key

    The name of the HTML attribute to add/update

    System.Object value

    The value of the HTML attribute to add/update

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Attrs(IDictionary<String, Object>)

    Adds or updates a set of HTML attributes using a dictionary to express the attributes.

    Declaration
    public IFieldConfiguration Attrs(IDictionary<string, object> attributes)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<System.String, System.Object> attributes

    A dictionary of attributes

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Attrs(IDictionary<String, String>)

    Adds or updates a set of HTML attributes using a dictionary to express the attributes.

    Declaration
    public IFieldConfiguration Attrs(IDictionary<string, string> attributes)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<System.String, System.String> attributes

    A dictionary of attributes

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Attrs(Func<Object, Object>[])

    Adds or updates a set of HTML attributes using lambda methods to express the attributes.

    Declaration
    public IFieldConfiguration Attrs(params Func<object, object>[] attributes)
    Parameters
    Type Name Description
    System.Func<System.Object, System.Object>[] attributes

    A list of lambas where the lambda variable name is the name of the attribute and the value is the value

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Attrs(Object)

    Adds or updates a set of HTML attributes using anonymous objects to express the attributes.

    Declaration
    public IFieldConfiguration Attrs(object attributes)
    Parameters
    Type Name Description
    System.Object attributes

    An anonymous object of attributes

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Cols(Int32)

    Sets the number of cols for a textarea to use.

    Declaration
    public IFieldConfiguration Cols(int numCols)
    Parameters
    Type Name Description
    System.Int32 numCols

    The number of cols for the textarea

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Disabled(Boolean)

    Sets the field to be disabled (value not submitted, can not click).

    Declaration
    public IFieldConfiguration Disabled(bool disabled = true)
    Parameters
    Type Name Description
    System.Boolean disabled
    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Exclude(Enum[])

    Excludes one or more Enum values from the generated field.

    Declaration
    public IFieldConfiguration Exclude(params Enum[] enumValues)
    Parameters
    Type Name Description
    System.Enum[] enumValues

    The value of Enum(s) to exclude from the generated field.

    Returns
    Type Description
    IFieldConfiguration
    | Improve this Doc View Source

    GetBagData<TData>(String)

    Returns data from the Bag stored in the given property or default(TData) if there is none present.

    Declaration
    public TData GetBagData<TData>(string propertyName)
    Parameters
    Type Name Description
    System.String propertyName

    The name of the property to retrieve the data for

    Returns
    Type Description
    TData

    The data from the Bag or default(TData) if there was no data against that property in the bag

    Type Parameters
    Name Description
    TData

    The type of the expected data to return

    | Improve this Doc View Source

    HideEmptyItem()

    Hide the empty item that would normally display for the field.

    Declaration
    public IFieldConfiguration HideEmptyItem()
    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Id(String)

    Override the default id for the field.

    Declaration
    public IFieldConfiguration Id(string id)
    Parameters
    Type Name Description
    System.String id

    The text to use for the id

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    InlineLabel(IHtmlContent)

    Sets an inline label for a checkbox.

    Declaration
    public IFieldConfiguration InlineLabel(IHtmlContent labelHtml)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Html.IHtmlContent labelHtml

    The html to use for the label

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    InlineLabel(Func<Object, IHtmlContent>)

    Sets an inline label for a checkbox.

    Declaration
    public IFieldConfiguration InlineLabel(Func<dynamic, IHtmlContent> labelHtml)
    Parameters
    Type Name Description
    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> labelHtml

    The html to use for the label as a templated razor delegate

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    InlineLabel(String)

    Sets an inline label for a checkbox.

    Declaration
    public IFieldConfiguration InlineLabel(string labelText)
    Parameters
    Type Name Description
    System.String labelText

    The text to use for the label

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    InlineLabelWrapsElement(Boolean)

    Specify that inline labels should wrap their input element. Important for bootstrap.

    Declaration
    public IFieldConfiguration InlineLabelWrapsElement(bool wrapElement = true)
    Parameters
    Type Name Description
    System.Boolean wrapElement

    True if the input element should be wrapped.

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Label(IHtmlContent)

    Override the default label for the field.

    Declaration
    public IFieldConfiguration Label(IHtmlContent labelHtml)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Html.IHtmlContent labelHtml

    The text to use for the label

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Label(Func<Object, IHtmlContent>)

    Override the default label for the field.

    Declaration
    public IFieldConfiguration Label(Func<dynamic, IHtmlContent> labelHtml)
    Parameters
    Type Name Description
    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> labelHtml

    The text to use for the label as a templated razor delegate

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Label(String)

    Override the default label for the field.

    Declaration
    public IFieldConfiguration Label(string labelText)
    Parameters
    Type Name Description
    System.String labelText

    The text to use for the label

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Max(Decimal)

    Sets the maximum value to accept for numeric text controls.

    Declaration
    public IFieldConfiguration Max(decimal max)
    Parameters
    Type Name Description
    System.Decimal max

    The maximum value to accept

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Max(Int64)

    Sets the maximum value to accept for numeric text controls.

    Declaration
    public IFieldConfiguration Max(long max)
    Parameters
    Type Name Description
    System.Int64 max

    The maximum value to accept

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Max(String)

    Sets the maximum value to accept for numeric text controls.

    Declaration
    public IFieldConfiguration Max(string max)
    Parameters
    Type Name Description
    System.String max

    The maximum value to accept

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Min(Decimal)

    Sets the minimum value to accept for numeric text controls.

    Declaration
    public IFieldConfiguration Min(decimal min)
    Parameters
    Type Name Description
    System.Decimal min

    The minimum value to accept

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Min(Int64)

    Sets the minimum value to accept for numeric text controls.

    Declaration
    public IFieldConfiguration Min(long min)
    Parameters
    Type Name Description
    System.Int64 min

    The minimum value to accept

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Min(String)

    Sets the minimum value to accept for numeric text controls.

    Declaration
    public IFieldConfiguration Min(string min)
    Parameters
    Type Name Description
    System.String min

    The minimum value to accept

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    OverrideFieldHtml(IHtmlContent)

    Override the HTML of the form field.

    This gives you ultimate flexibility with your field HTML when it's not quite what you want, but you still want the form template (e.g. label, surrounding html and validation message).

    Declaration
    public IFieldConfiguration OverrideFieldHtml(IHtmlContent html)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Html.IHtmlContent html

    The HTML for the field

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    OverrideFieldHtml(Func<Object, IHtmlContent>)

    Override the HTML of the form field.

    This gives you ultimate flexibility with your field HTML when it's not quite what you want, but you still want the form template (e.g. label, surrounding html and validation message).

    Declaration
    public IFieldConfiguration OverrideFieldHtml(Func<dynamic, IHtmlContent> html)
    Parameters
    Type Name Description
    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> html

    The HTML for the field as a templated razor delegate

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Placeholder(String)

    Sets a hint to the user of what can be entered in the field.

    Declaration
    public IFieldConfiguration Placeholder(string placeholderText)
    Parameters
    Type Name Description
    System.String placeholderText

    The text to use for the placeholder

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Prepend(IHtmlContent)

    Prepends the given HTML to the form field.

    Declaration
    public IFieldConfiguration Prepend(IHtmlContent html)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Html.IHtmlContent html

    The HTML to prepend

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Prepend(Func<Object, IHtmlContent>)

    Prepends the given HTML to the form field.

    Declaration
    public IFieldConfiguration Prepend(Func<dynamic, IHtmlContent> html)
    Parameters
    Type Name Description
    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> html

    The HTML to prepend as a templated razor delegate

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Prepend(String)

    Prepends the given string to the form field.

    Declaration
    public IFieldConfiguration Prepend(string str)
    Parameters
    Type Name Description
    System.String str

    The string to prepend

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Readonly(Boolean)

    Sets the field to be readonly (value can not be modified).

    Declaration
    public IFieldConfiguration Readonly(bool readonly = true)
    Parameters
    Type Name Description
    System.Boolean readonly
    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Required(Boolean)

    Sets the field to be required.

    Declaration
    public IFieldConfiguration Required(bool required = true)
    Parameters
    Type Name Description
    System.Boolean required
    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Rows(Int32)

    Sets the number of rows for a textarea to use.

    Declaration
    public IFieldConfiguration Rows(int numRows)
    Parameters
    Type Name Description
    System.Int32 numRows

    The number of rows for the textarea

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    SetField(IHtmlContent)

    Sets the field that the field configuration is wrapping so that a call to ToHtmlString() will output the given field.

    Declaration
    public void SetField(IHtmlContent field)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Html.IHtmlContent field

    The field being configured

    | Improve this Doc View Source

    SetField(Func<IHtmlContent>)

    Sets a lambda expression to get the field that the field configuration is wrapping so that a call to ToHtmlString() will output the given field.

    Declaration
    public void SetField(Func<IHtmlContent> field)
    Parameters
    Type Name Description
    System.Func<Microsoft.AspNetCore.Html.IHtmlContent> field

    A lambda returning the HTML to output

    | Improve this Doc View Source

    SetField(Func<Object, IHtmlContent>)

    Sets the field that the field configuration is wrapping so that a call to ToHtmlString() will output the given field.

    Declaration
    public void SetField(Func<dynamic, IHtmlContent> field)
    Parameters
    Type Name Description
    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> field

    The field being configured as a templated razor delegate

    | Improve this Doc View Source

    Step(Decimal)

    Sets the stepping interval to use for numeric text controls.

    Declaration
    public IFieldConfiguration Step(decimal step)
    Parameters
    Type Name Description
    System.Decimal step

    The stepping interval

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    Step(Int64)

    Sets the stepping interval to use for numeric text controls.

    Declaration
    public IFieldConfiguration Step(long step)
    Parameters
    Type Name Description
    System.Int64 step

    The stepping interval

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    WithFalseAs(String)

    Change the label that represents false.

    Declaration
    public IFieldConfiguration WithFalseAs(string falseString)
    Parameters
    Type Name Description
    System.String falseString

    The label to use as false

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    WithFormatString(String)

    Uses the given format string when outputting the field value.

    Declaration
    public IFieldConfiguration WithFormatString(string formatString)
    Parameters
    Type Name Description
    System.String formatString

    The format string to use

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    WithHint(IHtmlContent)

    Supply a HTML hint to display along with the field.

    Declaration
    public IFieldConfiguration WithHint(IHtmlContent hint)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Html.IHtmlContent hint

    The hint markup

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    WithHint(Func<Object, IHtmlContent>)

    Supply a HTML hint to display along with the field.

    Declaration
    public IFieldConfiguration WithHint(Func<dynamic, IHtmlContent> hint)
    Parameters
    Type Name Description
    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> hint

    The hint markup as a templated razor delegate

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    WithHint(String)

    Supply a string hint to display along with the field.

    Declaration
    public IFieldConfiguration WithHint(string hint)
    Parameters
    Type Name Description
    System.String hint

    The hint string

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    WithHintId(String)

    Specify an ID to use for a field hint.

    Declaration
    public IFieldConfiguration WithHintId(string hintId)
    Parameters
    Type Name Description
    System.String hintId

    The ID to use

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    WithNoneAs(String)

    Change the label that represents none.

    Declaration
    public IFieldConfiguration WithNoneAs(string noneString)
    Parameters
    Type Name Description
    System.String noneString

    The label to use as none

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    WithoutInlineLabel()

    Specify that no inline label should be generated.

    Declaration
    public IFieldConfiguration WithoutInlineLabel()
    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    WithoutLabelElement()

    Don't use a <label>, but still include the label text for the field.

    Declaration
    public IFieldConfiguration WithoutLabelElement()
    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    WithTrueAs(String)

    Change the label that represents true.

    Declaration
    public IFieldConfiguration WithTrueAs(string trueString)
    Parameters
    Type Name Description
    System.String trueString

    The label to use as true

    Returns
    Type Description
    IFieldConfiguration

    The IFieldConfiguration to allow for method chaining

    | Improve this Doc View Source

    WriteTo(TextWriter, HtmlEncoder)

    Called when form component outputted to the page; writes the form content HTML to the given writer.

    Declaration
    public void WriteTo(TextWriter writer, HtmlEncoder encoder)
    Parameters
    Type Name Description
    System.IO.TextWriter writer

    The writer to write to

    System.Text.Encodings.Web.HtmlEncoder encoder

    The HTML encoder to use when writing

    Implements

    IFieldConfiguration
    Microsoft.AspNetCore.Html.IHtmlContent
    IReadonlyFieldConfiguration

    Extension Methods

    HtmlAttributesExtensions.ToHtmlAttributes(Object)
    FieldConfigurationExtensions.TabIndex(IFieldConfiguration, Int32)
    FieldConfigurationExtensions.AutoFocus(IFieldConfiguration)
    HtmlContentExtensions.ToHtmlString(IHtmlContent)
    FieldConfigurationExtensions.AsInputGroup(IFieldConfiguration)
    • Improve this Doc
    • View Source
    Back to top © Copyright 2012-2020 MRCollective, Rob Moore, Matt Davies and the contributors to ChameleonForms.