[TYPO3-project-formidable] Refresh and dynamic listbox

Izzie Greys izzie.greys at gmail.com
Tue Jul 22 09:37:52 CEST 2008


Hi, it's me again. I'm sorry to bother you with my problem but I really ned
your help. I have made some change and now the form is entirely working in
edition mode but it's still not working in creation mode. Problems are
still:
1 - If I click on the create button on the page where is my
renderlet lister, my listbox "rubrique" is ok but my listbox "categorie" is
empty. I would like it contains the elements in relation with the "rubrique"
selected.
2 - If I select a element of the listbox "rubrique", my form is closed and
I'm redirected on my lister.
Nothing is created. But it works fine with the edit form. I select an
element in the listbox "rubrique" and the listbox "categorie" is updated. I
don't understand this redirection ?!? Why ? I'm confuse.

My new code:
<renderlet:LISTBOX name="rubrique" label="Rubrique">
   <onchange refresh="true"/>
      <data>
           <userobj>
                <php>
                     <![CDATA[
                         return
$GLOBALS["TYPO3_DB"]->exec_SELECTgetRows("uid as value, nom as
caption","table_rubrique","","nom","");
                     ]]>
                </php>
           </userobj>
     </data>
</renderlet:LISTBOX>

<renderlet:LISTBOX name="parent_category" label="Catégorie">
      <onchange refresh="true"/>
           <data>
                <items>
                       <item caption="" value=""/>
                </items>
                <userobj>
                      <php>
                           <![CDATA[
                                $iRubrique =
$this->oDataHandler->_getThisFormData("rubrique");
                                if(intval($iRubrique) > 0)
                                {
                                $where .= "rubrique='".$iRubrique."'";
                                return
$GLOBALS["TYPO3_DB"]->exec_SELECTgetRows("uid as value, label as
caption","table_categorie",$where,"label","");
                            }
                          ]]>
                      </php>
               </userobj>
       </data>
</renderlet:LISTBOX>

Thanks for reading.
Regards,
Izzie

2008/7/18 Izzie Greys <izzie.greys at gmail.com>:

> Hello list,
>
> I have another question for you about the edit/creation form and the action
> <onchange refresh="true"/> on the renderlet listbox. Here it's my problem.
> In my edit form/creation form I have a renderlet listbox like this one:
>
> <renderlet:LISTBOX name="rubrique" label="Rubrique">
>     <onchange refresh="true"/>
>     <data>
>            <userobj>
>                  <php>
>                      <![CDATA[
>                            return
> $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows("uid as value, label as
> caption","table_rubrique","","","");
>                      ]]>
>                 </php>
>            </userobj>
>      </data>
> </renderlet:LISTBOX>
>
> When I select one element of the list my second listbox is updated:
>
> <renderlet:LISTBOX name="categorie" label="Catégorie">
>     <data defaultvalue="">
>          <items>
>                <item caption="" value=""/>
>          </items>
>          <userobj>
>               <php>
>                   <![CDATA[
>                        $iRubrique =
> $this->oDataHandler->_getThisFormData("rubrique");
>                        if(intval($iRubrique) > 0)
>                        {
>                            $where .= "parent='".$iRubrique."'";
>                            return
> $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows("uid as value, label as
> caption","table_categorie",$where,"","");
>                        }
>                  ]]>
>              </php>
>          </userobj>
>     </data>
> </renderlet:LISTBOX>
>
> My problems are:
> 1 - If I click on the create button or edit button on the page where is my
> renderlet lister, my listbox "rubrique" is ok but my listbox "categorie" is
> empty. I would like it contains the elements in relation with the
> "rubrique"
> selected.
> 2 - The other problem concern the create form. If I select a element of the
> listbox "rubrique", my form is closed and I'm redirected on my lister.
> Nothing is created. But it works fine with the edit form. I select an
> element in the listbox "rubrique" and the listbox "categorie" is updated.
>
> I don't know how to resolve these problems. I hope you can help me.
>
> Thanks in advance and have a good day.
> _______________________________________________
> 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