Hello,
There seems to be no "Field Label" for all field types "File." Please see the attached images. I have included a snapshot of the manage fields screen as well as the node add screen.

Thanks,
Patrick

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nils.destoop’s picture

Can you show me the groups where they are placed in? I see the labels from imagefields and filefields.

pjwharding’s picture

Stalski’s picture

Status: Active » Closed (cannot reproduce)
FileSize
124.56 KB

I could not reproduce this behavior. Couldn't this be your theme?
If we can reproduce this with more information (not screenshots) ... we could fix it, but I doubt if it has anything to do with field group. You'll need to investigate which css hides your label.

Stalski’s picture

I can also add that there is still a bug in drupal core on vertical tabs css.
The css is done like:

.vertical-tabs legend {
    display: none;
}

which is very very difficult to override so it works all the way. Since the toggling of vertical tabs is javascript, I think core should do the legend selector in javascript.

Anonymous’s picture

Status: Closed (cannot reproduce) » Needs review

I've been running into this as well. It occurs with the default Seven admin theme due to the Core CSS described above. However, you'll only run into it if you have a file/image field with the ability to upload more than one file.

With a file field with only one allowed upload the label for the field is used as the label, somewhat like this:


<div>
  <label for="file">Thumbnail</label>
  <div><input type="file" name="file" /></div>
  <div>Description</div>
</div>

However, for a multiple file upload field, all file input fields are wrapped with a fieldset, and the legend is used as the label, more like this:


<fieldset>
  <legend>Thumbnails</legend>

  <label for="file">Add a new file</label>
  <div><input type="file" name="file" /></div>
  <div>Description</div>

  <label for="file">Add a new file</label>
  <div><input type="file" name="file" /></div>
  <div>Description</div>
</fieldset>

Which of course, leads to the legend disappearing due to the Core CSS you've described above. Honestly, I'm not particularly sure what the rational for that CSS is, however, my guess would be that since most items in the vertical system tabs at the bottom of node edit forms are for singular tasks, the label on the tab itself is used as the "legend" in place of the actual legend.

Would it be possible to specify CSS to override this functionality specifically for legends within a vertical tabs group created by Field group? It seems that in the majority of cases when you create a vertical tabs group you'd want the legend to show. However, if you simply create a vertical tab which is grouped with the system tabs at the bottom then you'd expect the default Core styling. Adding the following CSS to field_group.field_ui.css should override and basically reset the core styles for multiple value file fields, but only if the vertical tab is within a vertical tabs group:


div.field-group-tabs-wrapper div.field-type-image fieldset,
div.field-group-tabs-wrapper div.field-type-file fieldset {
   border: 1px solid #CCCCCC;
   margin: 1em 0;
   padding: 2.5em 0 0;
   position: relative;
}

div.field-group-tabs-wrapper div.field-type-image legend,
div.field-group-tabs-wrapper div.field-type-file legend {
  display: block;
}

Pretty long post for a simple problem.

Stalski’s picture

True.
I merged the css with the current one and again a couple of problems will be fixed. I hope this does not introduce new bugs.
I am testing it now on vertical tabs inside vertical tabs (and Yes, some people do that :( )
Pushed to git.

Hydra’s picture

Status: Needs review » Fixed

Well I would say it works! But the question is, why seven hides the label in this particular case? hmm

Stalski’s picture

Status: Fixed » Closed (fixed)
tbenice’s picture

Status: Closed (fixed) » Active

This also occurs for other fields such as date field which implements fieldsets in the field markup.
I fixed it by adding:

div.field-group-tabs-wrapper div.field-type-image legend,
div.field-group-tabs-wrapper div.field-type-file legend,
div.field-group-tabs-wrapper div.field-type-date legend,
.vertical-tabs .field-group-fieldset legend {
display: block;
}

This seems like a more general issue...maybe more fields are affected? I'm hoping there's a more generic solution. Feel free to close again if this is off issue.

nils.destoop’s picture

Status: Active » Closed (duplicate)

marking this as duplicate from #1305312: Label Hidden