RadioButtonGroup
RadioButtonGroup component is part of the Primer ViewComponents forms framework. If you are building a form, please consider using the framework instead of this standalone component.Description
A group of mutually exclusive radio buttons.
Arguments
| Name | Default | Description |
|---|---|---|
name | StringValue for the HTML name attribute. | |
label | StringLabel text displayed above the input. | |
hidden | BooleanWhen set to | |
caption | StringA string describing the field and what sorts of input it expects. Displayed below the group. | |
invalid | BooleanIf set to | |
validation_message | StringA string displayed between the caption and the input indicating the input's contents are invalid. This option is, by default, set to the first Rails validation message for the input (assuming the form is associated with a model object). Use | |
label_arguments | HashAttributes that will be passed to Rails' |
Methods
radio_button(system_arguments: Hash, block: Proc)
Adds a radio button to the group.
Parameters
| Name | Default | Description |
|---|---|---|
system_arguments | HashThe arguments accepted by | |
block | ProcThe block accepted by |