- Issue created by @Anybody
- Assigned to thomas.frobieter
- Status changed to Needs review
about 1 year ago 2:56pm 26 February 2024 - 🇩🇪Germany Anybody Porta Westfalica
@thomas.frobieter please review.
The result is like this then:
<input class="active form-radio" disabled="disabled" type="radio" id="edit-planvariant-zmp-live-plus-bronce-yearly" name="planvariant" value="zmp_live_plus_bronce_yearly" checked="checked">
- Merge request !4Added wrapper_attribute instead of a custom prefix / suffix wrapper → (Merged) created by Anybody
- 🇩🇪Germany Anybody Porta Westfalica
@thomas.frobieter I added another MR which sets the
#wrapper_attributes
instead of#attributes
as I think that is what you were looking for!This is the result:
<div class="active js-form-item form-item js-form-type-radio form-item-planvariant js-form-item-planvariant form-disabled"> <input data-drupal-selector="edit-planvariant" disabled="disabled" type="radio" id="edit-planvariant-zmp-live-plus-bronce-yearly" name="planvariant" value="zmp_live_plus_bronce_yearly" checked="checked" class="form-radio">
Or should we probably set both for maximum flexibility?
- 🇩🇪Germany Anybody Porta Westfalica
Here's the related blog entry: https://julian.pustkuchen.com/en/drupal-fapi-set-radios-checkboxes-class...
I think putting the active class on the input is the Drupal standard. But from a theming perspective, I'd vote for the second class on the wrapper. But this should be "form-item--active".
Not sure how to merge the two forks... so would you be so kind? ;)
- Issue was unassigned.
- Status changed to Fixed
about 1 year ago 2:03pm 12 March 2024 - 🇩🇪Germany Anybody Porta Westfalica
Please check if the change result is correct!
Automatically closed - issue fixed for 2 weeks with no activity.