If you have a regular collapsible fieldset inside a vertical tab group, the content is invisible.

This is due to the CSS for vertical tabs making legend elements set to display:none, and since the collapsible fieldset legends are links to expand and collapse the fieldset, nothing in that fieldset is visible. Furthermore, if the legends are set to display:block the absolute positioning applied makes the legend appear on top of the first line of content inside the fieldset.

The solution I applied was to add the following CSS override:

div.vertical-tabs .vertical-tabs-panes .collapsible legend {
display: block;
}

div.vertical-tabs .vertical-tabs-panes .collapsible .fieldset-legend {
margin: 0;
position: relative;
}

Comments

Stalski’s picture

Status: Active » Closed (cannot reproduce)

I don't have this problem when I have "vtab group > vtab > fieldset.collapsible". I see in the description of the bug that you missed out the vertical tab pane. It's not meant to just nest normal fieldsets in the group itself, that's how drupal handles its vertical panes. You can nest in it what you want, but you need to follow the instructions above the fields forms.

I could not reproduce the problem when practicing the normal way.

Stalski’s picture

Status: Closed (cannot reproduce) » Postponed (maintainer needs more info)

Well the status was a little too hard, perhaps ;)
You can answer if you like ofcourse

scott.whittaker’s picture

I see, but if I use a vtab group to enclose my vertical tabs, they appear in a vtab group block above the Drupal tabs, while without a vtab group, all the vertical tabs are presented together with the default Drupal node ones, which looks a lot nicer.

Also if I use a vtab group, the height of the vtab group is determined by the height of the content in the current vtab. So if my vtab group has say two vtabs in it, and the content of the selected vtab is say 2/3rds of the visible page, then I see two vtabs at the top, then 2/3rds of a page of empty space before I can see the other tabs below. This means scrolling the screen just to see all of the vtabs in many cases.

This kind of defeats the neatness and compactness of vtabs, which I thought was the point of using them. I guess the only other solution would be to make one root vtab group for all vtabs, but I can't drag the default Drupal vtabs into it, so that would probably require a module with a form alter hack to move them into the custom vtab group, which seems a little excessive.

Perhaps I'm missing something, but a couple of lines of CSS seems a much simpler fix. I apologize if I've misunderstood, I'm just getting used to D7 and issues with contrib. I love what you've done with Field group, it really should be in core.

Stalski’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

The only thing I can answer here, is the css problem you experiencing. This is drupal core and the default css suites me fine. So maybe for the styling of your height problem and so, file an issue under drupal, where vertical tabs are living.

jessebeach’s picture

I just ran into this issue and I have to agree with scott. There's no reason to hide the legend and break the functionality of collapisble fieldsets. I'll propose a patch as soon as I untangle the CSS. Removing the display:none on the legend tag doesn't quite solve the issue because the legend is absolutely positioned and the content below it crashes up into it.

jessebeach’s picture

Turns out this is more trouble than it's worth. I'm just overriding the styles in my module.

scott.whittaker’s picture

Please forgive me if this issue belongs to core or another project, but there is an even more significant issue with user-generated fieldsets inside a vertical tabs in that the markup is now not even being output to the page. This bug does not seem to affect content generated by contributed modules - for example the Date module produces it's own collapsible fieldsets for advanced settings, which are showing up OK.

But fieldsets created by the fieldset module are no longer output at all.

Fidelix’s picture

IMO, this issue marked as closed doesn't look right in the moment, honestly.
Subscribing...

intervalle’s picture

I agree with Fidelix: the fact that you can not have functional fieldsets under vertical tabs without changing the css seems not to be the expected function for a lot of people ...
@Stalski: can you re-open the issue please?

Stalski’s picture

Version: 7.x-1.0-rc2 » 7.x-1.1

@all and @intervalle: another patch should have made sure the css is changed do fieldsets inside vertical tabs do get displayed.
Have you tested this in 7.x-1-1 ?

rickvug’s picture

Anyone experiencing this issue should look at the core issue #1015798: Fieldsets inside vertical tabs have no title and can't be collapsed.