Interface IReadonlyFieldConfiguration
Immutable field configuration for use when generating a field's HTML.
Namespace: ChameleonForms.Component.Config
Assembly: ChameleonForms.Core.dll
Syntax
public interface IReadonlyFieldConfiguration
Properties
| Improve this Doc View SourceAppendedHtml
A list of HTML to be appended to the form field in ltr order.
Declaration
IEnumerable<IHtmlContent> AppendedHtml { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Html.IHtmlContent> |
Bag
A dynamic bag to allow for custom extensions using the field configuration.
Declaration
dynamic Bag { get; }
Property Value
Type | Description |
---|---|
System.Object |
DisplayType
Returns the display type for the field.
Declaration
FieldDisplayType DisplayType { get; }
Property Value
Type | Description |
---|---|
FieldDisplayType |
EmptyItemHidden
Whether or not the empty item is hidden.
Declaration
bool EmptyItemHidden { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ExcludedEnums
Enum value(s) to exclude from the generated field.
Declaration
Enum[] ExcludedEnums { get; }
Property Value
Type | Description |
---|---|
System.Enum[] |
FalseString
The label that represents false.
Declaration
string FalseString { get; }
Property Value
Type | Description |
---|---|
System.String |
FieldContainerClasses
Any CSS class(es) to use for the field container element.
Declaration
string FieldContainerClasses { get; }
Property Value
Type | Description |
---|---|
System.String |
FieldHtml
The HTML to be used as the field html.
Declaration
IHtmlContent FieldHtml { get; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Html.IHtmlContent |
FormatString
The format string to use for the field.
Declaration
string FormatString { get; }
Property Value
Type | Description |
---|---|
System.String |
HasInlineLabel
Whether or not to use an inline <label>.
Declaration
bool HasInlineLabel { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasLabelElement
Whether or not to use a <label>.
Declaration
bool HasLabelElement { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Hint
Get the hint to display with the field.
Declaration
IHtmlContent Hint { get; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Html.IHtmlContent |
HintId
The ID to use for a field hint.
Declaration
string HintId { get; }
Property Value
Type | Description |
---|---|
System.String |
HtmlAttributes
Attributes to add to the form element's HTML.
Declaration
IDictionary<string, object> HtmlAttributes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> |
InlineLabelText
Gets any text that has been set for an inline label.
Declaration
IHtmlContent InlineLabelText { get; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Html.IHtmlContent |
LabelClasses
Any CSS class(es) to use for the field label.
Declaration
string LabelClasses { get; }
Property Value
Type | Description |
---|---|
System.String |
LabelText
Gets any text that has been set for the label.
Declaration
IHtmlContent LabelText { get; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Html.IHtmlContent |
NoneString
The label that represents none.
Declaration
string NoneString { get; }
Property Value
Type | Description |
---|---|
System.String |
PrependedHtml
A list of HTML to be prepended to the form field in ltr order.
Declaration
IEnumerable<IHtmlContent> PrependedHtml { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Html.IHtmlContent> |
ShouldInlineLabelWrapElement
Whether or not inline <label> should wrap their <input> element.
Declaration
bool ShouldInlineLabelWrapElement { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
TrueString
The label that represents true.
Declaration
string TrueString { get; }
Property Value
Type | Description |
---|---|
System.String |
ValidationClasses
Any CSS class(es) to use for the field validation message.
Declaration
string ValidationClasses { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceGetBagData<TData>(String)
Returns data from the Bag stored in the given property or default(TData) if there is none present.
Declaration
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 |