Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
On a multiple values required entity reference field, there is no indication that the field is required.
I also found that the #prefix and #suffix added by Bootstrap are removed because the tag seems to not be allowed.
Comment | File | Size | Author |
---|---|---|---|
#6 | bootstrap-multiple_value_field_required-2691037-6.patch | 1.07 KB | Grimreaper |
#2 | bootstrap-multiple_value_field_required-2691037-2.patch | 1.77 KB | Grimreaper |
Comments
Comment #2
GrimreaperHere is maybe a beginning of the solution.
It is inspired from /core/includes/theme.inc template_preprocess_field_multiple_value_form()
Comment #3
markhalliwellThis entire preprocess is legacy code form 7.x. The reason the
<label>
wrapper is removed is because it's not an instance ofMarkupInterface
(seeFormattableMarkup
).That all being said, just adding single
label
class will not work because that is a reserved Bootstrap component class and will need an additional variation class to go along with it.I imagine this entire preprocess needs to be rethought.
Comment #4
GrimreaperOk, thanks for the reply.
Comment #5
markhalliwellBump
Comment #6
GrimreaperHello,
As for #2691007-9: Required span not displayed in bootstrap panel, I simplified the patch as now only the 'form-required' class is enough.
Thanks for the review.
Comment #8
markhalliwellThanks @Grimreaper!