Skip to content

Commit 44e398f

Browse files
committed
add names to the switch checkboxes
1 parent e9118f4 commit 44e398f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

examples/official-site/sqlpage/migrations/01_documentation.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,11 @@ When loading the page, the value for `:username` will be `NULL` if no value has
359359
']')),
360360

361361
('form','A toggle switch in an HTML form is a user interface element that allows users to switch between two states, typically "on" and "off." It visually resembles a physical switch and is often used for settings or options that can be enabled or disabled.',
362-
json('[{"component":"form"}, '||
363-
'{"type": "switch", "label": "Dark theme", "description": "Enable dark theme"},' ||
364-
'{"type": "switch", "label": "A required toggle switch", "required": true,"checked": true},' ||
365-
'{"type": "switch", "label": "A disabled toggle switch", "disabled": true},' ||
366-
']')),
362+
json('[{"component":"form"},
363+
{"type": "switch", "label": "Dark theme", "name": "dark", "description": "Enable dark theme"},
364+
{"type": "switch", "label": "A required toggle switch", "name": "my_checkbox", "required": true,"checked": true},
365+
{"type": "switch", "label": "A disabled toggle switch", "name": "my_field", "disabled": true}
366+
]')),
367367

368368
('form', 'This example illustrates the use of the `select` type.
369369
In this select input, the various options are hardcoded, but they could also be loaded from a database table,

0 commit comments

Comments
 (0)