[TYPO3-project-formidable] How to preset Values in SELECTOR

JéŽrô™me Schneider j.schneider at ameos.com
Mon Nov 30 17:26:41 CET 2009


Hello Aike,

You have to see it like this: renderlet:SELECTOR/available/data defines 
the possible items, and renderlet:SELECTOR/data/defaultvalue tells 
Formidable that the renderlet selector has to be init'd with the given 
values selected (among the possible values)

SO: The proper way to achieve this is to set a defaultvalue on the 
selector itself.

Example that should work:

<renderlet:SELECTOR name="fields">
	<available>
		<data>
			<userobj>
				<php><![CDATA[
	return array(
		array(
			"caption" => "one",
			"value" => 1,
		),
		array(
			"caption" => "two",
			"value" => 2,
		),
		array(
			"caption" => "three",
			"value" => 3,
		),
	);
				]]></php>
			</userobj>
		</data>
	</available>
	<data defaultValue="1,3" />
	<!-- defaultValue may have been given in a userobj of course -->
</renderlet:SELECTOR>


I hope it helps,
Jerome Schneider


Aike Terjung a écrit :
> Hello,
> 
> i am trying to use the SELECTOR element. While adding items under  <available> is no problem, items added und <selected> are not shon in the left Listbox. The formidable release is 421. Is this an, error, or have i done something wrong?
> 
> This is the code i use:
> 
>         <renderlet:SELECTOR name="fields">
>              <selected>
>                 <data>
>                     <userobj>
>                         <php><![CDATA[
> 			
>                         ...
>                         gennerate entries
>                         ...
> 			return $data;
> 			]]>
>                         </php>
>                     </userobj>
>                 </data>
>             </selected>
>             <available>
>                 <data>
>                     <userobj>
>                         <php><![CDATA[
> 			
>                         ...
>                         gennerate entries
>                         ...
> 			return $data;
> 			]]>
>                         </php>
>                     </userobj>
>                 </data>
>             </available>
>    
> </renderlet:SELECTOR>
> 
> i hope you can help me with this problem, because i realy need the selector.
> 
> thank you in advance
> 
> Aike


More information about the TYPO3-project-formidable mailing list