Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
c

FormControlItem

class FormControlItem[Msg]

One checkbox choice within a bound field, created by item.

Items share raw values, validation, and interaction state with their parent field. They do not add logical fields or hidden fallback inputs. Use a repeated-value codec such as Root.texts for multiple selections; unchecked and disabled items follow native submission rules.

Defined by scalive.FormControlItem. View source (scalive/api/src/scalive/forms/FormBinding.scala:362-401)

Methods3

checkbox

def checkbox(checkedValue: String, mods: Mod.Input[Msg]*): HtmlElement[Msg]

Renders a checkbox checked when the parent's raw values contain the explicit token. ARIA remains opt-in through the parent control's validation attributes.

Defined by scalive.FormControlItem.checkbox. View source (scalive/api/src/scalive/forms/FormBinding.scala:377-386)

def checkbox(checkedValue: Signal[String], mods: Mod.Input[Msg]*): HtmlElement[Msg]

Renders a reactive token without changing item identity. Both token and raw-value changes update checked state; changing the token never rewrites the field's retained values.

Defined by scalive.FormControlItem.checkbox. View source (scalive/api/src/scalive/forms/FormBinding.scala:391-400)

id

def id: Signal[String]

Form- and field-scoped item identity, suitable for a label's forId.

Defined by scalive.FormControlItem.id. View source (scalive/api/src/scalive/forms/FormBinding.scala:369-369)

name

def name: Signal[String]

The parent's exact browser field name, shared by every item.

Defined by scalive.FormControlItem.name. View source (scalive/api/src/scalive/forms/FormBinding.scala:372-372)