Actions
Bug #79394
closedViewhelper "f:form.select" produces extra (empty) option tag
Start date:
2017-01-19
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
If the viewhelper "f:form.select" is used together with the new viewhelper "f:form.select.option" ist produces an additional empty option tag which should not be there.
Reason:
Lines 128ff. in "typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php" create an empty array element, if the option attribute is not set in the viewhelper. This leads to the creation of the additional tag in the function "renderOptionTags()" (line 185ff.)
Solution:
- split the function "renderOptionTags" into two parts
- renderOptionTags
- renderPrependOptionTag
- create new function "renderEmptyOption" tag
- check whether childContent is empty ... if yes, create an empty option tag, otherwise use childContent for the as option tags
I will come up with a patch.
Updated by Marcus Schwemer over 7 years ago
- Subject changed from Viewhelper "f:form.select" produces extra option tag to Viewhelper "f:form.select" produces extra (empty) option tag
Updated by Wouter Wolters over 7 years ago
- Status changed from New to Rejected
This is a duplicate of #79274
Actions