FormControlRadioButton

in namespace DotVVM.Bootstrap5.Controls

Extends the RadioButton control for usage in Form.

Usage & Scenarios

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

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

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

Sample 1: Basic Usage

<bs:FormControlRadioButton HelpText="Help Text">
    <bs:RadioButton ID="r" CheckedItem="{value: Color}" CheckedValue="r" Text="R" />
    <bs:RadioButton ID="g" CheckedItem="{value: Color}" CheckedValue="g" Text="G" />
    <bs:RadioButton ID="b" CheckedItem="{value: Color}" CheckedValue="b" Text="B" />
</bs:FormControlRadioButton>
public class ViewModel : DotvvmViewModelBase
{
    public string Color { get; set; }
}

Properties

Name Type Description Notes Default Value
property icon Content List<RadioButton> Gets or sets a collection of RadioButton controls, that are validated together.
attribute
inner element
static value
bindable
default
null
property icon Enabled Boolean
attribute
inner element
static value
bindable
default
True
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 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 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