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.
Comment | File | Size | Author |
---|---|---|---|
#3 | webform_markup_empty_display_options-1985348.patch | 503 bytes | quicksketch |
Edit component: Terms and Conditions | Problem Solved Daily 2013-05-02 12-30-53.png | 63.38 KB | jnycz |
Comments
Comment #1
quicksketchHm 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.
Comment #2
caminadaf CreditAttribution: caminadaf commentedAny updates on this? I really needed this working :/
Comment #3
quicksketchSo 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.
Comment #4
sassafrass CreditAttribution: sassafrass commentedI 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.
Comment #5
DanChadwick CreditAttribution: DanChadwick commentedClosed as I don't there there is still an issue here after the patch in #3