[TYPO3-project-formidable] Lisbox in edition mode : how to make selected

Luc Muller l.mul-nospam-ler at ameos.com
Fri Jul 11 09:02:49 CEST 2008


Hi Sanosuke :)

I think I should make some test to be sure about what I'm saying, but I 
got a lot of stuff to do at the moment.

when you notice that :

"If set, it will be used only when the form has not been already submitted ( first display ) and when in creation mode ( not edition mode )"

This sounds good to me. you want to have a defaultvalue when in creation mode, because you might think one option of the listbox is going to be more used than all the other.

In edition mode, formidable should remember the value that is selected in the listbox, and this seems not to be the case. It seems strange to me, because it should be a bug that we should have noticed.

can you tell me what happen to the listbox, if you submit the form and make an error on another field, there the value should be remembered I think isn't it ?

Jerome is in holyday for the moment, so he won't be helpful right know. by the way, if I got time today I'll made some testing about that point to see if we got a bug or something else, but this is very strange.

Luc


Sanosuke303 a écrit :
> Hi and thank you very much to try to help me.
>
> I have take the example of fe_user and fe_group, but in fact it's a simple list of fe_users, and the default value must be the fe_user that is stored in a table "project" (that I have created). fe_user is a simple foreign key in the project table. No multiple allowed (not like fe_groups)
>
> So, the problem is other.
>
> My listbox is like this :
>         <renderlet:LISTBOX name="charge-etude" label="Chargé d'étude affecté à la mission"> 
>             <data>
>               <items>
>                 <item caption="" value=""/>
>               </items>
>               
>               <userobj>  
>                   <php><![CDATA[  
>                         
>                       return $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows(  
>                           "uid as value, CONCAT(name,CONCAT(' ',tx_feusersextendedfield_first_name)) as caption",  
>                           "fe_users",  
>                           "pid=4",  
>                           "",  
>                           "caption ASC"  
>                       );  
>
>                   ]]></php>  
>               </userobj>  
>
>             </data>
>         </renderlet:LISTBOX>
>
> I don't know how to make an item "selected".
>
> In the formidable wiki, it's written about defaultvalue :
> "If set, it will be used only when the form has not been already submitted ( first display ) and when in creation mode ( not edition mode )"
>
> But it was a screenshot of a form in edition :
> http://wiki.typo3.org/index.php/Image:Formidable-Documentation-Shot-2.png
> We can this that the "title" of the user is well selection with "Mister"=>M
>
> Regards.
>
>
>       _____________________________________________________________________________ 
> Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
>   


-- 

*Luc Muller*
/Web Developper/
/Formidable - Rapid Application Developpement Framework for Typo3 
<http://formidable.typo3.ug>/
/Typo3 Ameos <http://www.ameos.com>/



More information about the TYPO3-project-formidable mailing list