I have a simple webform with 3 different field types, email, hidden, and markup. The markup field has no display options. The display dropdown is present but has no options. My goal is to hide the label on display.

On a hunch I created another markup field for that form in questions. Same issue, no display options.

One thing I noticed is when the form is displayed using module_invoke the label is not printed. When I display the form in a block using drupal_get_form and drupal_render the markup field has a label. This does not validate since the label's "for" attribute does not have a corresponding form component. This is why I would like to set the label to hidden.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Hm interesting. The markup label shouldn't have a Display fieldset at all, and it should never print the label. Markup components only have a label on them for administrative purposes.

caminadaf’s picture

Any updates on this? I really needed this working :/

quicksketch’s picture

Status: Active » Postponed (maintainer needs more info)
FileSize
503 bytes

So I can't confirm any particular problem with Markup elements on display. For me, they never show a label or wrapper of any kind. The only problem I can see is that the "Display" fieldset is shown when editing a markup component, but it's empty. That particular problem is easy enough to solve, we can just backport the code from the 7.x-4.x branch which fixed this problem. I've committed this patch which solves the unnecessary fieldset, but I'm unable to reproduce the problem where a markup field produces any kind of label at all. This might be a problem specific to your site's theme, or caused by another module you have installed that is affecting Webform's output.

sassafrass’s picture

I am using webform 7.x-3.19 and have the same issue. "The markup field has no display options." The display link is present but doesn't show any options. In addition, when I save the webform, the markup tags are displayed rather than being rendered as html. At one point in my development this worked as expected. I am not sure at what version it stopped working, but I think I've only updated once from 7.x-3.18 to 7.x-3.19 since January.

DanChadwick’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (fixed)

Closed as I don't there there is still an issue here after the patch in #3