I have an application settings page with a bunch of checkboxes. How should I choose the default checked state of the checkboxes?
I see the following options:
Always set the default state to unchecked, but this leads to negative statements in the checkbox text (like "Don't automatically show due schedules"), which is sometimes hard to understand.
Always phrase the checkbox text to have a positive meaning (like "Automatically show due schedules"), but this leads to inconsistent default checkbox states, both checked and unchecked.
... any other options?
Any guidelines, best-practices, advices for this problem?
If the value attribute was omitted, the default value for the checkbox is on , so the submitted data in that case would be subscribe=on .
The Input Checkbox defaultChecked property in HTML is used to return the default value of checked attribute. It has a boolean value which returns true if the checkbox is checked by default, otherwise returns false.
"On" is the default value for the value attribute of a checkbox.
You can also set if a checkbox should be checked by default by ticking the Start Checked box.
These are my "rules" for this:
So - Option 2 from your list =)
Definitely Number 2. Checkboxes should always have positive meaning. If this means some of your defaults are checks and some are not then that's not a problem in my opinion.
I'd choose 2. I see no reason why all checkboxes should be unchecked by default. Choose the state that the user most likely wants (or that causes least damage) and a text that is easiest to understand.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With