Suggestion #7533

form.select: building option keys with viewhelper not possible

Added by Marc Bastian Heinrichs over 11 years ago. Updated about 10 years ago.

Status:
New
Priority:
Could have
Assignee:
-
Start date:
2010-04-29
Due date:
% Done:

0%

Estimated time:
Has patch:
Tags:

Description

The fluid parser doesn't support using viewhelpers as array keys, so
the following would not get parsed

<f:form.select name="filter" id="filterbox" options="{ 
    {f:uri.action(action: 'index', arguments:{filter: 'health'})}:'{f:translate(key: \'dep.health\')}' 
}"> 
    <select> 
        <option value="">###dummy###</option> 
    </select> 
</f:form.select>

Feature-request:
Introducing an new argument optionsValuesArray to map the options array keys to other values.
Example:

<f:form.select name="filter" id="filterbox" options="{ 
    health: '{f:translate(key: \'dep.health\')}' 
}" optionsValuesArray ="{ 
    health: '{f:uri.action(action: \'index\', arguments: {filter: \'health\'})}'
}"> 
    <select> 
        <option value="">###dummy###</option> 
    </select> 
</f:form.select>

Files

7533_selectviewhelper.txt (1.64 KB) 7533_selectviewhelper.txt Marc Bastian Heinrichs, 2010-06-18 15:27
7533_selectviewhelper_v2.txt (1.6 KB) 7533_selectviewhelper_v2.txt Marc Bastian Heinrichs, 2010-06-18 15:31
7533_selectviewhelper_v2.patch (1.6 KB) 7533_selectviewhelper_v2.patch Marc Bastian Heinrichs, 2010-06-18 16:16
#1

Updated by Sebastian Kurfuerst about 11 years ago

  • Project changed from 534 to TYPO3.Fluid
#2

Updated by Sebastian Kurfuerst about 11 years ago

  • Priority changed from Should have to Could have
#3

Updated by Marc Bastian Heinrichs about 11 years ago

Don't I submitted a patch? Here it is.

#5

Updated by Marc Bastian Heinrichs about 11 years ago

Lalala... now with correct file extension

#6

Updated by Bastian Waidelich about 11 years ago

  • Project changed from TYPO3.Fluid to Fluid - ViewHelper - Incubator
#7

Updated by Bastian Waidelich about 11 years ago

  • Subject changed from Fluid: building form.selectviewhelper options keys with viewhelper not possible (has patch) to form.select: building option keys with viewhelper not possible
#8

Updated by Marc Bastian Heinrichs over 10 years ago

This has a bug with selecting the correct option as selected, because
comparing for the selected value is done after replacing the keys with the values from optionsValuesArray.

#9

Updated by Bastian Waidelich about 10 years ago

  • Tracker changed from Feature to Suggestion

Also available in: Atom PDF