Closed (fixed)
Project:
Webform
Version:
8.x-5.0-rc11
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2018 at 08:13 UTC
Updated:
16 May 2018 at 19:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wouter.dierick@gmail.com commentedPatch attached
Comment #3
jrockowitz commented@wouterdierick I would like to figure out how you were able to create a file upload element without a #title. The #title even when it is not visible is used to improve accessibility.
Did you create the element via editing the YAML?
I think you can just change...
return $element['#title'] ?: $element['#webform_key'];...to...
return (!empty($element['#title'])) ? $element['#title'] : $element['#webform_key'];Can you please update the patch.
Comment #4
tim-dielsA file upload field seems to behave a bit different then the other fields. It doesn't have $element['#title'] or $element['#webform_key'] in the function that calls for the label => displayDisabledWarning()
So changing the patch wouldn't solve the issue nor does the first patch solves the issue but makes the notices go away.
The actual error is: '' is a 'Generic element' element, which has been disabled and will not be rendered.
But managed_file is enabled and the field is rendered.
Comment #5
vakulrai commentedI am also able to crate a webform field without a title.
uploading a patch for above issue.
Comment #7
jrockowitz commentedThanks for the patch.
Comment #8
jrockowitz commented@tim-diels I think you might need to create a new ticket in the issue queue for #4