FormControlTextBox

in namespace DotVVM.Bootstrap5.Controls

Extends the TextBox control for usage in Form.

Usage & Scenarios

A special version of the TextBox control that can be used in Form.

See TextBox for more info on how to use this control.

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

Sample 1: Basic Usage

<bs:FormControlTextBox LabelText="Basic" 
                       Text="{value: TextValue}" 
                       Placeholder="Basic"/>

<bs:FormControlTextBox LabelText="horizontal" 
                       Layout="Horizontal" 
                       Text="{value: TextValue}" 
                       Size="small"/>

<bs:FormControlTextBox LabelText="Basic" 
                       LabelType="Floating" 
                       Text="{value: TextValue}" />

Properties

Name Type Description Notes Default Value
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 Enabled Boolean Gets or sets a value indicating whether the control is enabled and can be modified.
attribute
inner element
static value
bindable
default
null
property icon FormatString String Gets or sets a format of presentation of value to client.
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 Placeholder String Gets or sets a placeholder value. Cannot be combined with a floating label type.
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 SelectAllOnFocus Boolean Gets or sets whether all text inside the TextBox becomes selected when the element gets focused.
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
property icon Text IValueBinding<String> Gets or sets the text in the control.
attribute
inner element
static value
bindable
default
null
property icon TextBoxType TextBoxType Gets or sets the mode of the text field.
attribute
inner element
static value
bindable
default
Normal
property icon UpdateTextOnInput Boolean Gets or sets whether the viewmodel property will be updated immediately after change. By default, the viewmodel is updated after the control loses its focus.
attribute
inner element
static value
bindable
default
False
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

Events

Name Type Description
event icon Changed ICommandBinding Gets or sets the command that will be triggered when the onchange event is fired.
event icon TextInput ICommandBinding Gets or sets the command that will be triggered when the user is typing in the field. Be careful when using this event - triggering frequent postbacks can make bad user experience. Consider using static commands or a throttling postback handler.

HTML produced by the control