Problem/Motivation
We have a case where we want to hide the legend of a form field. If we add $form['field']['#title_display'] = 'invisible'; in code, this doesn't hide the required span. Maybe we would then need a helper class that hides the legend completely?
Proposed resolution
Add a fieldset__hidden-legend class or similar to forms.scss.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | hide-require-fieldset-legend-mark-when-invisible-3073559-2.patch | 854 bytes | pivica |
Comments
Comment #2
pivica commentedI think it is much easier to just not render required mark span element in a case when title_display is invisible. Attaching a patch for this, tested against webform fieldset, works OK.
Comment #4
pivica commentedCommitted.
Comment #6
forbidden_ commentedIf I just need to hide Cateogey legend fieldset from all webforms how?
Comment #7
pivica commented> If I just need to hide Cateogey legend fieldset from all webforms how?
Really depends a lot on your html. But I would do this probably with custom CSS in custom theme.