Opened 19 hours ago
Last modified 18 hours ago
#36136 closed New feature
New form field for toggle inputs — at Initial Version
Reported by: | Hristo Trendafilov | Owned by: | |
---|---|---|---|
Component: | Forms | Version: | |
Severity: | Normal | Keywords: | togglefield, toggle, field |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Toggle inputs are quite common web elements and are widely used in modern web pages, CSS frameworks, etc.
Those could be narrowed down to the BooleanField
but with several key differences:
- They never be required, even if defied like so;
- They should always return cleaned data to be
False
if not passed in the form data; - They should always have an initial value of
False
unless explicitly defined; - They have a special widget, based on the CheckboxInput, but adding
role="switch"
andaria-checked="false/true"
/based on the value/;
Note:
See TracTickets
for help on using tickets.