[TYPO3-dev] Populating form select options in fluid

Richard Achatz info at richardachatz.de
Mon Mar 24 22:00:37 CET 2014


Have you tried <f:debug>{foo:'bar'}</f:debug> and compared it with <f:debug>{options}</f:debug> ?



"Heinz Müller" <mullerheinz046 at gmail.com> schrieb:
>Hi all,
>
>I want to populate the options of a select box with data in my
>extension
>but it doesn't work.
>
>In my controller:
>
>$options = array();
>$options[] = 'foo';
>$options[] = 'bar';
>$this->view->assign('options', $options);
>
>In fluid:
><f:form.select property="myProperty" options="{options}"/>
>
>But my select box remains empy. The only way I can assign values is
>explicitly through (options="{foo: 'bar'}") but I want to generate the
>contents from my controller, not hardcoded in my view.
>
><f:debug>{_all}</f:debug> shows that $options exists and that it has
>the
>desired contents.
>
>I have also tried to fill the array with objects according to this
>article:
>http://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/BestPractice/OptionsForSelect.html
>but this did not help either.
>
>What am I doing wrong?
>
>Thanks for any hints,
>Heinz
>_______________________________________________
>TYPO3-dev mailing list
>TYPO3-dev at lists.typo3.org
>http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.Email sent using Axigen Free Mail Server:
http://www.axigen.com/mail-server/free


More information about the TYPO3-dev mailing list