[TYPO3-project-formidable] Message after data have been saved in the DB

Luc Muller l.mul-nospam-ler at ameos.com
Wed Jul 9 14:26:04 CEST 2008


Hi Izzie

You should have a look at actionlets

those should be placed inside the <control> tag

<actionlets> are process at the end of all the process this means after 
data are inserted in the DB

you can either use :
<actionlets>
            <actionlet:USEROBJ>
                <userobj>
                    <php><![CDATA[/*<?php*/
                         //here you can paste so code to do stuff after 
datas are inserted in DB
                         // you can retrieve stored data using :
                         $aData = $this->oDataHandler->getStoredData();

                         return false;

                    /*?>*/]]></php>
                </userobj>
            </actionlet:USEROBJ>
            <actionlet:REDIRECT>
                <pageid>
                   here you can input directly a page id OR
                   <userobj>
                        <php><![CDATA[/*<?php*/
                            // you can use an userobj to redirect to a 
more advanced url.
                            return $this->cObj->typolink_URL(
                                array(
                                    "parameter" => 1,
                                    "additionalParams" => "",
                                    "returnLast" => "url",
                                    "useCacheHash" => "1",
                                )
                            );

                        /*?>*/]]></php>
                    </userobj>
                </pageid>
            </actionlet:REDIRECT>
        </actionlets>

Hope this helps

Luc =:0)

Izzie Greys a écrit :
>  <typo3-project-formidable at lists.netfielders.de>Hey,
>
> I'm trying to use a submit button on my edit/create users form with a
> message "User saved" if the data are ok before return to my users list. Here
> it's what I have done :
>
> <renderlet:SUBMIT name="btn-save" label="Save">
>      <onclick runat="server">
>           <userobj>
>                 <php><![CDATA[/*<?php*/
>                         $sLink = $this->cObj->typolink_URL(
>                          array(
>                                "parameter" => 51,
>                                "returnLast" => "url",
>                                "useCacheHash" => "1",
>                              )
>                          );
>                         return $this->sendToPage($this->toWebPath($sLink));
>                         /*?>*/]]>
>                  </php>
>          </userobj>
>     </onclick>
> </renderlet:SUBMIT>
>
> I have 2 problems :
> 1 - If the data are wrong, I can't see the error messages (from the
> validators) because of the redirection.
> 2 - I don't know how to add a message "User saved". I know how to make a
> confirm message yes/no after the click but not just an information message
> about the good insertion in the database.
>
> Can you help me ?
>
> Thanks in advance.
>
> Best regards.
>   


-- 

*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