Problem
When a webform is placed as a block with a custom label configured, the custom element output uses the webform's native
title instead of the block's custom label.
Steps to reproduce:
1. Place a webform block in layout builder
2. Configure a custom label (e.g., "My Custom Title") with "Display title" enabled
3. View the page with custom elements format
Expected behavior:
- "Display title" checked → display the block's configured "Title"
- "Display title" unchecked → display no title
Actual behavior:
- "Display title" checked → displays the webform entity's native title (wrong)
- "Display title" unchecked → displays no title (correct)
Code is at CustomElementsWebformBlock::getCustomElementsWebformBlock()
Issue fork lupus_decoupled-3568578
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
fagoComment #4
fagoupdating MR to follow this logic:
- title = '' when label_display is off (backwards compatible)
- title = block label when label_display is visible and label is given
while I'd not design the API like this right now, this is a backwards-compatible fix to the block-label being ignored.
Comment #6
fago