-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconsider how render_settings_field_multibox() works #36
Comments
P.S. also, some checkboxes use the same value, for example the three ones above use: and only two of them get printed out. |
I think the use-case for what the For what you describe, in the context of the above three checkboxes, shouldn't this actually become a settings section ("Default article settings") with three individual checkboxes? This would match our idea of #5 as well. |
Well actually they're not just three checkboxes, the Discussion page is full of single checkboxes grouped logically but used for different settings. Then maybe we should consider to have 2 separate functions:
Wort noting this second case, which as far as I see is the only one of the twos used in core, needs a different structure of the passed array because there are multiple settings names, so for each checkbox:
|
I think a settings section does exactly that, it groups fields that are logically related. We already have the functionality in place that we'd need for this.
Actually, this use-case would be a good argument for our idea to make settings sections actual fieldsets (see #14). If a settings section was a fieldset and contained the three checkboxes as single fields, it would have exactly the structure you're describing. |
render_settings_field_multibox()
perfectly works for a group of checkboxes sharing the samename
attribute. That is, a multi-choice where users can check multiple values for the same group.This works in HTML but it's arguable useful for settings since there's rarely (never?) a setting with multiple values.
Instead, the current group of checkboxes in core are all single settings with a unique
name
attribute. They're visually grouped because logically related. However, the don't use the same setting name.How to render a group like the following one?
The only way right now would be a custom callback 😞
The text was updated successfully, but these errors were encountered: