[TYPO3-mvc] Fluid: form.select view helper and empty default item

Henrik Møller Rasmussen info at hmrdesign.dk
Tue Apr 20 08:49:19 CEST 2010


>> You can try something like:
>>
>> $tempCategory = new Tx_MyExtname_Domain_Model_Category();
>> $tempCategory->setCategorieName('---');
>>
> $this->view->assign('categories', array_merge(array(0 => 'All
> Categories'), $this->categoryRepository->findAll()));
>


I tried this and has successfully rendered a --- option in the select 
field. But when I select the --- option, the setCategory() is never 
executed - tried a debug(); exit; within setCategory. I was expecting it 
to execute the method with a null object as argument.

No errors is showed, it just doesn't change category on submit.

Any hints?

Thanks!!

- Henrik



More information about the TYPO3-project-typo3v4mvc mailing list