Radio
The Bootstrap radio
form component, implemented in Ruby. Use it like any of the other matestack form components in your apps, pages and components. It offers customizable options to simply achieve what is possible in bootstrap with this component. See below for more information about the configuration options.
bs_form_radio(*args, &block)
bs_form_radio(*args, &block)
Renders bootstrap radio input fields.
Required options
options
- Expects an Array or Hash of selectable options
Optional options
label
- Expects a string, gets displayed before the first input fieldform_text
- Expects a string, gets displayed after the last input fielddisabled
- If set to:true
, the radio input fields are set to disabled and clicking them doesn't yield any effectvariant
- If set to:inline
, the wrappingdiv
is displayed asinline-block
instead of the defaultblock
Examples
Example 1: Basic usage with an Array
Example 2: Basic usage with a Hash
Example 3: Using a label
Example 4: Using a form_text
Example 5: Using the disabled
option
disabled
optionExample 6: Using the :inline
variant
:inline
variantLast updated