Closed bugfolder closed 1 year ago
Since the changes will probably be done all the same time, I'll wrap adding #indentation
into this task (see https://github.com/backdrop/backdrop-issues/issues/5999#issuecomment-1457219612). Include it in all elements themed by theme_form_element()
or theme_container()
. (@argiepiano, anything else to add to this?)
@argiepiano, anything else to add to this?
That's it! Thanks.
One more thing to add, which is related: #options should warn people not to mix integer and string keys in an option list, because when PHP compares integers to strings (something that's likely to happen anytime someone is checking whether a particular key was chosen), it casts the strings to integers, which can give unexpected results. See https://github.com/backdrop/backdrop-issues/issues/6024.
https://github.com/backdrop/backdrop-issues/issues/5999 has been merged, great work @argiepiano and @bugfolder! When #indentation
is added, please remove "Needs Documentation" from that issue.
Documentation created: https://docs.backdropcms.org/form_api#indentation.
Also added some discussion discouraging mixing key types to https://docs.backdropcms.org/form_api#options_property.
Thanks for working on documenting these things @bugfolder 🙏🏼
We recently added discussion to https://docs.backdropcms.org/form_api#radios and https://docs.backdropcms.org/form_api#checkboxes pointing out that one can add description to the individual buttons by adding extra keys with
#description
properties. This discussion should be expanded to note that other properties could be added the same way (and which ones).Also, if/when https://github.com/backdrop/backdrop-issues/issues/5999 is merged, the
#indentation
property will be one of these.