Form

in namespace DotVVM.Bootstrap5.Controls

Represents Form control.

Usage & Scenarios

The Form control is used to represent a form with FormControl controls inside it.

https://getbootstrap.com/docs/5.2/forms/overview/

Sample 1: Using inside a Form

The FormControl control and a Form control could be used together to avoid unnecessary code.

Every FormControl property has a representation of a Form control with an Item prefix (e.g., ItemFormControlType, ItemLayout, ItemLabelType...). All property values are propagated to every FormControl control inside a Form control.

The properties specified on a FormControl control directly override the property propagated by a Form control.

To avoid adding the FormControlType property to every FormControl, multiple FormControls could be wrapped with a Form and an ItemFormControlType property set to FormControl.

<bs:Form ItemFormControlType="FormControl" ItemLayout="Grid">
    <bs:FormControl LabelText="Custom FormControl text">
        <dot:Button>Dotvvm Button</dot:Button>
    </bs:FormControl>
    <%--This FormControl is horizontal!--%>
    <bs:FormControl Layout="Horizontal" LabelText="Custom FormControl text">
        <dot:Button>Dotvvm Button</dot:Button>
    </bs:FormControl>
</bs:Form>

Properties

Name Type Description Notes Default Value
property icon Content List<DotvvmControl>
attribute
inner element
static value
bindable
default
null
property icon ItemControlSizeAll String Gets or sets the size of the control for all screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ItemControlSizeLarge String Gets or sets the size of the control for large screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ItemControlSizeMedium String Gets or sets the size of the control for medium screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ItemControlSizeSmall String Gets or sets the size of the control for small screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ItemControlSizeXLarge String Gets or sets the size of the control for extra large screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ItemControlSizeXXLarge 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 ItemFormControlCssClass String Gets or sets the CSS class to apply to the form control element.
attribute
inner element
static value
bindable
default
null
property icon ItemFormControlType FormControlType? Gets or sets the available form control type.
attribute
inner element
static value
bindable
default
null
property icon ItemHelpContent 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 ItemHelpText 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 ItemLabelContent 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 ItemLabelSizeAll String Gets or sets the size of the label for all screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ItemLabelSizeLarge String Gets or sets the size of the label for large screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ItemLabelSizeMedium String Gets or sets the size of the label for medium screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ItemLabelSizeSmall String Gets or sets the size of the label for small screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ItemLabelSizeXLarge String Gets or sets the size of the label for extra large screen sizes.
attribute
inner element
static value
bindable
default
null
property icon ItemLabelSizeXXLarge 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 ItemLabelText 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 ItemLabelType LabelType? Gets or sets the label type. Possible values are `Default` and `Floating`.
attribute
inner element
static value
bindable
default
null
property icon ItemLayout 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 ItemRenderLabel Boolean? Gets or sets whether the label is rendered.
attribute
inner element
static value
bindable
default
null
property icon ItemSize Size? Gets or sets the size of the label and form control elements.
attribute
inner element
static value
bindable
default
null
property icon Visible Boolean Gets or sets whether the control is visible. When set to false, `style="display: none"` will be added to this control.
attribute
inner element
static value
bindable
default
True

HTML produced by the control