Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a fairly minor bug with an easy workaround.
When adding a "Webform submission data" field in Views (which is totally freaking awesome btw!), if you select "No label" a label still shows. The workaround is to choose "Custom label" and then clear whatever is in the Label textbox, then select "No label" again and save.
Comment | File | Size | Author |
---|---|---|---|
#5 | webform-views_no_label-1864102-5.patch | 1.37 KB | DanChadwick |
Comments
Comment #1
MrPaulDriver CreditAttribution: MrPaulDriver commentedI am finding the same and thank you for the workaround @nodecode
This needs fixing though.
Comment #2
MrPaulDriver CreditAttribution: MrPaulDriver commentedComment #3
AldenC CreditAttribution: AldenC commentedThank you very much for integrating Views into Webform 4.X. It opens up vast opportunties to manage submissions.
The Create a label option of "No label" does not work. I also first used a work-around by choosing "Custom label" and then setting it to "". But I decided to look a bit deeper and I found the culprit.
Line 103 of webform_handler_field_submission_data.inc which currently reads:
elseif (isset($this->options['label'])) {
apparently $this->options['label'] is populated on default so function label() never returns '' for the "No label" option. A simple solution is to change this line to read:
elseif ($this->options['custom_label'] === 'custom' && isset($this->options['label'])) {
There may be a better way to fix this, but this worked for me.
Comment #4
quicksketchThanks @AldenC, that sounds like you're on the right track here. If this gets rolled as a patch I'll try it out and see if it solves the porblem.
Comment #5
DanChadwick CreditAttribution: DanChadwick commentedCommitted to 7.x-4.x and 8.x.