- Issue created by @sébastien-fr
- Assigned to sickness29
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 10:09am 14 November 2023 - last update
about 1 year ago 33 pass - 🇺🇦Ukraine sickness29
Added placeholders as configuration to address default widget and to elements that used in address form.
Used #empty_option property to display placeholders in country and administrative area select elements.
Also added FunctionalJavascript test to make sure configured placeholders for the widget are shown to user. - 🇺🇦Ukraine sickness29
Let me know if this at least can go into 2.0.x, so I can create patch for 2 version
- Status changed to Fixed
11 months ago 7:10pm 27 December 2023 - 🇷🇸Serbia bojanz
The documentation page is still valid, #after_build still works.
I've also provided the same example (which I just retested) in this comment: https://www.drupal.org/project/address/issues/3167404#comment-15375862 💬 There is not possible to set a description for form elements of address (fields of address) Fixed
And ultimately the reason why I said no to #field_descriptions is also the reason why I'm saying no to #placeholders. We do not need a custom mechanism on the form element level.
On the other hand, I do agree that it is very tempting to allow setting field descriptions and placeholders via the UI, as core allows for individual fields. However, the interest for that seems very low, so I would like to get more buy-in from the community before we start implementing and supporting either or both.
I am going to tentatively close this, in order to give sickness29 issue credit. I will also ping @dww to get his thoughts on the matter. Then, if and once enough interest materializes, we can restart this effort.
- 🇺🇸United States dww
+1 to continuing to document #after_build as the solution to these sorts of issues. It’s confusing for newer uses of address and developers, everyone expects form_alter to work. But adding a bunch of additional code to maintain seems worse.
I’m not the best person to assess, since I’m a co-maintainer, but if there are any places where more / better docs would help, please open issues about that. Very happy to make it more obvious how to solve these things.
Automatically closed - issue fixed for 2 weeks with no activity.