Project

General

Profile

Actions

Bug #82457

closed

OptionViewHelper ignores empty value

Added by Raphael Graf over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
Start date:
2017-09-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

The following code does not produce two selects with the same options:

<f:form.select name="select1" options="{options}" />
<f:form.select name="select2">
    <f:for each="{options}" key="key" as="value">
        <f:form.select.option value="{key}">{value}</f:form.select.option>
    </f:for>
</f:form.select>

$options = ['' => 'empty', 'foo' => 'bar'];
$this->view->assign($options);

The resulting HTML:

<select name="select1">
    <option value="">empty</option>
    <option value="foo">bar</option>
</select>
<select name="select2">
    <option>empty</option>
    <option value="foo">bar</option>
</select>

Note that the submitted value differs if the first option is selected.

Actions #1

Updated by Gerrit Code Review over 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54122

Actions #2

Updated by Raphael Graf over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #3

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF