[TYPO3-project-formidable] Default value

Jerome Schneider j.schneider at ameos.com
Mon Jul 23 10:18:23 CEST 2007


Hi Aurelien,

It's not working because the value has to be carried by the "value" 
property, no by "label"

Try this:

<items>
	<item caption="Suspendre" value="suspension"/>
</items>


Best regards,
Jerome


Aurélien Allienne a écrit :
> Hi,
> 
> I do this :
> <renderlet:CHECKBOX name="suspend">
>                        <data>
>                                <items>
>                                        <item caption=" Suspendre"
> label="suspension"/>
>                                </items>
> 
>                                <defaultvalue>
>                                        <userobj>
>                                        <php><![CDATA[
> 
> if($this->_oParent->conf['suspension'] == 0){
>                                                        return "suspension";
>                                                } else {
>                                                        return;
>                                                }
>                                        ]]></php>
>                                        </userobj>
>                                </defaultvalue>
>                        </data>
>                </renderlet:CHECKBOX>
> 
> But it don't seem to work
> 
> 2007/7/23, Jerome Schneider <j.schneider at ameos.com>:
>>
>> Hello Aurélien,
>>
>> You'll have to use the /data/defaultvalue  of the renderlet.
>>
>> Like this:
>>
>> http://wiki.typo3.org/index.php/Formidable_documentation#Using_userobj_for_defaultvalue_and_label 
>>
>>
>>
>> Hope this helps,
>> Jerome
>>
>>
>> Aurélien Allienne a écrit :
>> > No one have an idea for this problem? I use return  array('key' =>
>> > 'the_value') but it don't seem to work :(
>> >
>> > Regards
>> >
>> > Aurélien Allienne
>> >
>> > 2007/7/20, Aurélien Allienne <allienna at gmail.com>:
>> >>
>> >> Hi list,
>> >>
>> >> I use a form to modify information so after a select in a list, I show
>> a
>> >> form in which all field have been informed. The problem is this :
>> >>
>> >> I have a listbox like this :
>> >>
>> >> <renderlet:LISTBOX name="access" label="Service :">
>> >>                         <data>
>> >>                         <userobj>
>> >>                         <php><![CDATA[
>> >>                                 return
>> >> $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows(
>> >>                                         "uid as value, access_name as
>> >> caption",
>> >>
>> >>
>> >> "tx_manageguest_access_to_service",
>> >>                                         
>> "pid=".$this->_oParent->storage
>> >>                                 );
>> >>                         ]]></php>
>> >>                         </userobj>
>> >>                         <items>
>> >>                                 <item caption="" value="blank"/>
>> >>                                 <item caption="Autres" 
>> value="autres"/>
>> >>                         </items>
>> >>                         </data>
>> >>                         <onchange runat="ajax" params="access"
>> >> cached="true">
>> >>                         <userobj>
>> >>                         <php><![CDATA[
>> >>                                 $aParams = func_get_arg(1);
>> >>
>> >>                                 if($aParams["access"] === "autres") {
>> >>                                         return
>> >> $this->aORenderlets["container_more"]->majixDisplayBlock();
>> >>                                 } else {
>> >>                                         return
>> >> $this->aORenderlets["container_more"]->majixDisplayNone();
>> >>                                 }
>> >>
>> >>                         ]]></php>
>> >>                         </userobj>
>> >>                         </onchange>
>> >>                 </renderlet:LISTBOX>
>> >>
>> >> And I want that the default value is the value in the conf[]. How can
>> >> I do
>> >> this?
>> >>
>> >> Secondly, how can I notch a checkbox according to the "notch" param (0
>> or
>> >> 1)
>> >> in the conf[]
>> >>
>> >> Regards
>> >>
>> >> Aurélien Allienne
>> >> _______________________________________________
>> >> TYPO3-project-formidable mailing list
>> >> TYPO3-project-formidable at lists.netfielders.de
>> >>
>> >>
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable 
>>
>> >>
>> >>
>> _______________________________________________
>> TYPO3-project-formidable mailing list
>> TYPO3-project-formidable at lists.netfielders.de
>>
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable 
>>
>>


More information about the TYPO3-project-formidable mailing list