Bug #3635

Fluid: SelectViewHelper always appends the select-field's name with []

Added by Marcel Rosenberger over 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Must have
Category:
-
Target version:
-
Start date:
2009-06-09
Due date:
% Done:

0%

Estimated time:
0.00 h
Has patch:

Description

The name for a select-field will always be appended by [] whether the field is multiple or not.

<f:form.select name="mySelectField" options="{0: 'no', 1: 'yes'}" value="0" />

will result to

<select name="mySelectField[]">
    <option value="0" selected="selected">no</option>
    <option value="1">yes</option>
</select>

Note: mySelectField[] instead of mySelectField

The included file is a suggestion to fix the bug.


Files

ViewHelperArguments.php.patch (674 Bytes) ViewHelperArguments.php.patch location: typo3\sysext\fluid\Classes\ViewHelpers\Form\SelectViewHelper.php Marcel Rosenberger, 2009-06-09 19:14
#1

Updated by Bastian Waidelich over 12 years ago

  • Status changed from New to Closed

I can't reproduce this..
I use the exact input of your example and get

<select name="mySelectField">
<option value="0" selected="selected">no</option>
<option value="1">yes</option>
</select>

Please re-open ticket if this still occures with the current version (trunk).

#2

Updated by Marcel Rosenberger over 12 years ago

I can confirm that this is now fixed in the current trunk version.

#3

Updated by Bastian Waidelich about 12 years ago

  • Project changed from 534 to TYPO3.Fluid
  • Category deleted (432)

Also available in: Atom PDF