vertical_tabs form element does not work if at least one #group element is not specified outisde

Created on 5 February 2014, about 11 years ago
Updated 8 March 2024, about 1 year ago

When form contains #vertical_tabs and the tabs are located within the parent without the usage of #group they will not show up. In order for tabs to be displayed at least one tab has to have #group specified. I think this can be related to #601644: Vertical Tabs requires group to be specified before tabs β†’ .

πŸ› Bug report
Status

Closed: works as designed

Version

11.0 πŸ”₯

Component
FormΒ  β†’

Last updated 23 minutes ago

Created by

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡ΏNew Zealand luke.stewart

    Can confirm the behaviour in 13 still present in Drupal 10.

    Found #1856178: '#group' Form API property only works with

    elements β†’ which appears to relate and down the rabbit hole further we have #1168246: Freedom For Fieldsets! Long Live The DETAILS. β†’ .

    This details a solution that includes 'Use details everywhere we're (ab)using fieldsets currently. (including vertical tabs)'

    Suggesting that perhaps vertical tabs shouldn't be used for this behaviour.

    If we look at the author example in #17 we see that the side bar where the author lives no longer uses vertical tabs.

    Grepping the core code base for 'vertical_tabs' we still see reference to vertical tabs in various places. And if we check the documentation in the comments for
    web/core/lib/Drupal/Core/Render/Element/VerticalTabs.php

    we get usage which suggests that having to specify the group and not use a child element is how these elements are suppose to work.

    Given this I think this is closed works as designed. Apologies if I have misunderstood.

Production build 0.71.5 2024