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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Grimreaper created an issue. See original summary.

Grimreaper’s picture

Status: Active » Needs work
FileSize
1.77 KB

Here is maybe a beginning of the solution.

It is inspired from /core/includes/theme.inc template_preprocess_field_multiple_value_form()

markhalliwell’s picture

Component: User interface » Templates

This entire preprocess is legacy code form 7.x. The reason the <label> wrapper is removed is because it's not an instance of MarkupInterface (see FormattableMarkup).

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.

Grimreaper’s picture

Ok, thanks for the reply.

markhalliwell’s picture

Bump

Grimreaper’s picture

Status: Needs work » Needs review
FileSize
1.07 KB

Hello,

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.

markhalliwell’s picture

Status: Needs review » Fixed

Thanks @Grimreaper!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.