#79394Viewhelper "f:form.select" produces extra (empty) option tag
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.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.