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
form improvements with new types of field: header and switch (#906)
* form improvements with new types of field: header and switch
* added checked toggle switch example
* add names to the switch checkboxes
* update form header margins
* trailing whitespace
* docs
---------
Co-authored-by: lovasoa <[email protected]>
Copy file name to clipboardExpand all lines: examples/official-site/sqlpage/migrations/01_documentation.sql
+19-1Lines changed: 19 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -276,7 +276,7 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
276
276
('id', 'A unique identifier for the form, which can then be used to validate the form from a button outside of the form.', 'TEXT', TRUE, TRUE),
277
277
('auto_submit', 'Automatically submit the form when the user changes any of its fields, and remove the validation button.', 'BOOLEAN', TRUE, TRUE),
278
278
-- item level
279
-
('type', 'The type of input to use: text for a simple text field, textarea for a multi-line text input control, number to accept only numbers, checkboxor radio for a button that is part of a group specified in the ''name'' parameter, hidden for a value that will be submitted but not shown to the user. text by default.', 'TEXT', FALSE, TRUE),
279
+
('type', 'The type of input to use: text for a simple text field, textarea for a multi-line text input control, number to accept only numbers, checkbox, switch, or radio for a button that is part of a group specified in the ''name'' parameter, header for a form header, hidden for a value that will be submitted but not shown to the user. text by default.', 'TEXT', FALSE, TRUE),
280
280
('name', 'The name of the input field, that you can use in the target page to get the value the user entered for the field.', 'TEXT', FALSE, FALSE),
281
281
('label', 'A friendly name for the text field to show to the user.', 'TEXT', FALSE, TRUE),
282
282
('placeholder', 'A placeholder text that will be shown in the field when is is empty.', 'TEXT', FALSE, TRUE),
@@ -347,6 +347,24 @@ When loading the page, the value for `:username` will be `NULL` if no value has
('form','With the header type, you can group your input fields based on a theme. For example, you can categorize fields according to a person''s identity and their contact information.',
352
+
json('[{"component":"form","title":"Information about the person"}, '||
353
+
'{"type": "header", "label": "Identity"},'||
354
+
'{"name": "Name"},'||
355
+
'{"name": "Surname"},'||
356
+
'{"type": "header","label": "Contact"},'||
357
+
'{"name": "phone", "label": "Phone number"},'||
358
+
'{"name": "Email"},'||
359
+
']')),
360
+
361
+
('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.',
0 commit comments