[TYPO3-mvc] form.select add empty option

Stefan Frömken firma at sfroemken.de
Mon Aug 29 19:30:46 CEST 2011


I tried it already with array_merge. The errormessage sounds like: 
"argument 2 for array_merge is of type object but must be of type array".

Am 29.08.2011 19:01, schrieb Bjoern Haverland:
> Hi Stefan,
>
> try it with an array_merge operation in your controller.
>
> $this->view->assign('themes', array_merge(Array(Null), $yourThemes))
>
> Best regards
>
> Björn
>
> Am 29.08.2011 18:50, schrieb Stefan Frömken:
>> Hello MVC-Team,
>>
>> I want to add a simple empty option to form.select. The result should
>> look like this:
>>
>> <select ...>
>> <option value="">--</option>
>> ...
>> </select>
>>
>> I tried it this way...but it don't works:
>>
>> <f:form.select options="{themes}" optionValueField="uid"
>> optionLabelField="name" name="theme" value="--">
>> <option value="">--</option>
>> </f:form.select>
>>
>> Any other ideas?
>>
>> Stefan
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>>
>



More information about the TYPO3-project-typo3v4mvc mailing list