You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add radios/checkboxes Choices API and hash option support
Introduce field(:plan).radios(...) and field(:roles).checkboxes(...)
for declarative radio and checkbox groups. Each yields a Choice with
.radio, .checkbox, .label, .value, .text. Accepts the same option
formats as select (arrays, single values, ActiveRecord relations)
plus hashes (e.g. {1 => "Basic", 2 => "Pro"}).
Refactor DOM#id to take no arguments, add DOM.join and DOM::DELIMITER
for centralized id construction. Radio and Checkbox components now
use index-based ids via DOM.join, with backward-compatible defaults.
-**Hash options** for `select`, `radios`, and `checkboxes` — e.g. `radios(1 => "Basic", 2 => "Pro")`.
5
9
-**Radio component** with `field(:gender).radio("male")` API. Automatically handles name, value, and checked state. Each radio gets a unique DOM id based on its value (e.g. `user_gender_male`).
6
10
-**Checkbox collection support** — three modes:
7
11
-**Boolean** (on/off toggle): `Field(:featured).checkbox` renders with hidden "0" input
0 commit comments