[TYPO3-formidable] Edit form

Michael Paffrath michael.paffrath at gmail.com
Fri Aug 20 16:05:41 CEST 2010


Hi Domi,

thanks for your answer.
I actually need to update 2 tables.
But if you could give me an example for the <datahandler:DB> way that
would be helpful.
I tried http://formidable.typo3.ug/reference/control/datahandlerdb.html
but without success.

Greetings,
Michael

On Fri, Aug 20, 2010 at 4:01 PM, Domi Garms <djgarms at gmail.com> wrote:
> Hello Michael,
>
> for an edit or update for one table, you should use the
> <datahandler:DB> in the <control> section. It is much easier, you can
> insert and update easily all columns in your database.
>
> If you have any trouble, just ask
>
> Greetings
>
> Domi
>
> 2010/8/20 Michael Paffrath <michael.paffrath at gmail.com>:
>> Hi everyone,
>>
>> i am trying to build a form to edit records in the backend.
>> So far so good, but i don´t get the validation to work.
>>
>> Any suggestions what to do or what i could/should do better are welcome!
>>
>> Here is my code:
>>
>> <?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>
>>
>>                <datahandler:STANDARD />
>>                <renderer:STANDARD />
>>
>>                <actionlets>
>>                        <actionlet:USEROBJ>
>>                                <userobj>
>>                                        <php><![CDATA[/*<?php*/
>>                                                // write data to db ... tbd
>>                                        /*?>*/]]></php>
>>                                </userobj>
>>                        </actionlet:USEROBJ>
>>                </actionlets>
>>
>>                <datasources>
>>                        <datasource:DB name="userconfig">
>>                                <sql>
>>                                        <userobj>
>>                                                <php><![CDATA[
>>                                                        $sql = 'SELECT * FROM
>>                                                                        be_users bu,
>>                                                                        tx_3moink_userconfig mu WHERE
>>                                                                        bu.uid = '.$GLOBALS['BE_USER']->user['uid'].' AND
>>                                                                        mu.uid_foreign = '.$GLOBALS['BE_USER']->user['uid'];
>>                                                        return $sql;
>>                                                ]]></php>
>>                                        </userobj>
>>                                </sql>
>>                        </datasource:DB>
>>                </datasources>
>>
>>        </control>
>>
>>        <elements>
>>
>>                <renderlet:LISTER name="userconfig-list">
>>                        <template>
>>                                <path>EXT:3moink/formidable/edit_user_data.html</path>
>>                                <subpart>###LIST###</subpart>
>>                                <errortag>error</errortag>
>>                                <alternaterows>###ROW###</alternaterows>
>>                        </template>
>>                        <pager>
>>                                <rows perpage="1"/>
>>                        </pager>
>>                        <datasource use="userconfig" />
>>                        <columns>
>>                                <column name="email" listHeader="email" type="renderlet:TEXT"
>> activelistable="true">
>>                                        <validators>
>>                                                <validator:STANDARD>
>>                                                        <required message="Please provide an email adress." />
>>                                                        <email message="Email address not valid"/>
>>                                                </validator:STANDARD>
>>                                        </validators>
>>                                        <data>
>>                                                <value>
>>                                                        <userobj>
>>                                                                <php><![CDATA[/*<?php*/
>>                                                                        $aRowData = $this->oDataHandler->_getListData();
>>                                                                        return $aRowData['email'];
>>                                                                /*?>*/]]></php>
>>                                                        </userobj>
>>                                                </value>
>>                                        </data>
>>                                </column>
>>                        </columns>
>>                </renderlet:LISTER>
>>
>>                <renderlet:SUBMIT name="save" label="save">
>>                </renderlet:SUBMIT>
>>
>>        </elements>
>>
>> </formidable>
>>
>> Thanks for the help in advance,
>> Michael
>> _______________________________________________
>> TYPO3-project-formidable mailing list
>> TYPO3-project-formidable at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-formidable
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-formidable
>



-- 
Michael Paffrath

Vrolikstraat 359 C
1092 TB Amsterdam
+31 (0)6 12297498
michael at michaelpaffrath.com


More information about the TYPO3-project-formidable mailing list