FormControl

in namespace DotVVM.Bootstrap5.Controls

Represents a single element in the Form control.

Usage & Scenarios

The FormControl (known as FormGroup in Boostrap4) is used inside the Form control and renders a form field with a label.

https://getbootstrap.com/docs/5.2/forms/form-control

Sample 1: Basic Usage

The FormControl control can render a label for any child control placed inside it.

Consider using some existing controls that combine FormControl with the most popular form elements:

<bs:FormControl LabelText="Feedback" HelpText="You can describe it in a few sentences.">
    <bs:TextBox Type="MultiLine" Text="{value: 'Test'}" />
</bs:FormControl>

Properties

Name Type Description Notes Default Value
property icon Content DotvvmControl Gets or sets the inner form element.
attribute
inner element
static value
bindable
default
null
property icon ControlSizeAll String Gets or sets the size of the control for all screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ControlSizeLarge String Gets or sets the size of the control for large screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ControlSizeMedium String Gets or sets the size of the control for medium screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ControlSizeSmall String Gets or sets the size of the control for small screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ControlSizeXLarge String Gets or sets the size of the control for extra large screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ControlSizeXXLarge String Gets or sets the size of the control for extra extra large screen sizes.
attribute
inner element
static value
bindable
default
null
property icon FormControlCssClass String Gets or sets the CSS class to apply to the form control element.
attribute
inner element
static value
bindable
default
null
property icon FormControlType FormControlType? Gets or sets the available form control type.
attribute
inner element
static value
bindable
default
null
property icon HelpContent List<DotvvmControl> Gets or sets a custom template for for the help text. Cannot be combined with a `HelpText` property.
attribute
inner element
static value
bindable
default
null
property icon HelpText String Gets or sets a plain text for the help text. Cannot be combined with a `HelpContent` property.
attribute
inner element
static value
bindable
default
null
property icon LabelContent List<DotvvmControl> Gets or sets a custom template for for the control label. Cannot be combined with a `LabelText` property.
attribute
inner element
static value
bindable
default
null
property icon LabelSizeAll String Gets or sets the size of the label for all screen sizes.
attribute
inner element
static value
bindable
default
null
property icon LabelSizeLarge String Gets or sets the size of the label for large screen sizes.
attribute
inner element
static value
bindable
default
null
property icon LabelSizeMedium String Gets or sets the size of the label for medium screen sizes.
attribute
inner element
static value
bindable
default
null
property icon LabelSizeSmall String Gets or sets the size of the label for small screen sizes.
attribute
inner element
static value
bindable
default
null
property icon LabelSizeXLarge String Gets or sets the size of the label for extra large screen sizes.
attribute
inner element
static value
bindable
default
null
property icon LabelSizeXXLarge String Gets or sets the size of the label for extra extra large screen sizes.
attribute
inner element
static value
bindable
default
null
property icon LabelText String Gets or sets a plain text for the control label. Cannot be combined with a `LabelContent` property.
attribute
inner element
static value
bindable
default
null
property icon LabelType LabelType? Gets or sets the label type. Possible values are `Default` and `Floating`.
attribute
inner element
static value
bindable
default
null
property icon Layout FormControlLayout? Gets or sets the form control layout. Possible values are `Default`, `Horizontal` and `Grid`.
attribute
inner element
static value
bindable
default
null
property icon RenderLabel Boolean? Gets or sets whether the label is rendered.
attribute
inner element
static value
bindable
default
null
property icon Size Size? Gets or sets the size of the label and form control elements.
attribute
inner element
static value
bindable
default
null

HTML produced by the control