[TYPO3-formidable] Edit form
    Domi Garms 
    djgarms at gmail.com
       
    Sat Aug 21 12:50:06 CEST 2010
    
    
  
Hello Michael,
sorry I wasnt online yesterday. You cant pass
$GLOBALS['BE_USER']->user['uid'] ) into your form, because this is
reservated for the uid of your table. In your case formidable tries to
update the table with the uid of your backend user id, so it returns
false all the time.
Im online today, so if you have still trouble just ask!
Good luck
Domi
2010/8/20 Michael Paffrath <michael.paffrath at gmail.com>:
> Hi Domi,
>
> i managed to get so far that i get the form listed with the values.
> But it doesn´t save the given values.
> To me everything looks fine ... could it be backend related?
>
> This is how i call formidable in my backend extension:
> $this->oForm = t3lib_div::makeInstance("tx_ameosformidable");
> $this->oForm->init( $this, "EXT:3moink/formidable/edit_user_data.xml",
> $GLOBALS['BE_USER']->user['uid'] );
> return $this->oForm->render();
>
> Here´s my testcode:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <formidable version="1.0.182">
>
>        <meta>
>                <name>List of userconfig</name>
>                <form formid="list_of_userconfig" />
>                <debug>false</debug>
>                <displaylabels>false</displaylabels>
>        </meta>
>
>        <control>
>                <renderer:STANDARD />
>
>                <datahandler:DB>
>                        <tablename>be_users</tablename>
>                        <keyname>uid</keyname>
>                        <process>
>                                <beforeCreation>
>                                        <userobj>
>                                                <php><![CDATA[
>
>                                                        // create
>                                                        // adding pid, crdate and tstamp
>                                                        $aData = $this->getParams();
>
>                                                        $aData["pid"] = 343;
>                                                        $aData["crdate"] = time();
>                                                        $aData["tstamp"] = time();
>
>                                                        return $aData;
>
>                                                ]]></php>
>                                        </userobj>
>                                </beforeCreation>
>                                <beforeEdition>
>                                        <userobj>
>                                                <php><![CDATA[
>
>                                                        // update
>                                                        // changing tstamp
>                                                        $aData = $this->getParams();
>                                                        $aData["tstamp"] = time();
>                                                        return $aData;
>
>                                                ]]></php>
>                                        </userobj>
>                                </beforeEdition>
>                        </process>
>                </datahandler:DB>
>
>                <actionlets>
>                        <actionlet:USEROBJ>
>                                <userobj>
>                                        <php><![CDATA[/*<?php*/
>                                        /*?>*/]]></php>
>                                </userobj>
>                        </actionlet:USEROBJ>
>                </actionlets>
>
>                <datasources>
>                        <datasource:DB name="userconfig">
>                                <sql>
>                                        <userobj>
>                                                <php><![CDATA[
>                                                        $sql = 'SELECT * FROM
>                                                                        be_users
>                                                                        WHERE
>                                                                        uid = '.$GLOBALS['BE_USER']->user['uid'];
>                                                        return $sql;
>                                                ]]></php>
>                                        </userobj>
>                                </sql>
>                        </datasource:DB>
>                </datasources>
>
>        </control>
>
>        <elements>
>
>                <renderlet:TEXT name="uid" label="uid"/>
>
>                <renderlet:TEXT name="username" label="username"/>
>
>                <renderlet:TEXT name="email" label="cómpany">
>                        <validators>
>                                <validator:STANDARD>
>                                        <required message="Please provide an email adress." />
>                                        <email message="Email adress not valid"/>
>                                </validator:STANDARD>
>                        </validators>
>                </renderlet:TEXT>
>
>                <renderlet:SUBMIT name="save_all" label="save all">
>                </renderlet:SUBMIT>
>
>        </elements>
>
> </formidable>
>
>
> Any ideas?
>
> Greetings,
> Michael
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-formidable
    
    
More information about the TYPO3-project-formidable
mailing list