Checkbox Group: bind selected values
Read and restore an array of selected checkbox values.
Read and restore an array of selected checkbox values.
Before you begin
Section titled “Before you begin”- An App Connect page; a named form when the values will be submitted.
Group related choices
Section titled “Group related choices”Place the corresponding inputs inside the group. Give the group an ID for its combined binding. The inputs still need their own labels, values and submitted names; the wrapper does not create a new server payload automatically.
Configure Value and Set Value
Section titled “Configure Value and Set Value”Value and Set Value select inputs matching an array of values. The runtime normalizes provided values to strings. Read tagsGroup.value for an array of checked, enabled input values. Set Value [] clears all choices. Disabled checked inputs are omitted from the group result.
Example: restore saved selections
Section titled “Example: restore saved selections”Put checkboxes with values news and offers inside tagsGroup. Set Value to [‘news’,‘offers’] and confirm both are checked. Clear one and verify the result contains only the other string. Repeat the test after options are loaded dynamically.
Treat group Value as a selection source
Section titled “Treat group Value as a selection source”Changing a bound Value reapplies selection and its reset defaults. Updated reports changes to the combined value. Dynamically inserted inputs are observed and matched against the configured value; avoid a constantly changing binding that overwrites user choices.
Submission still belongs to the inputs
Section titled “Submission still belongs to the inputs”Use submitted names that match the server’s expected array convention. A combined page array is not itself an uploaded database relation. Validate each selected value and authorize the change at the endpoint.
Continue with a complete form workflow
Section titled “Continue with a complete form workflow”Use the related workflow to connect these controls to data and a verified submit result.
Check your result
Section titled “Check your result”You can configure the control, use its actual value shape and verify the example without confusing page state with a submitted or saved value.