[TYPO3-formidable] Store renderlet:upload in database

Domi Garms djgarms at gmail.com
Mon Aug 9 13:20:16 CEST 2010


Thanks a lot. Is there a site, where all data handlers are displayed?
Im a bit confused with

$this->getParams();
$this->rdt("element")
$this->oForm
$this->oDataHandler

and which methods could be called in which elements.

Regards,
Domi

2010/8/9 Stéphane FILLION <s.fillion at ameos.com>:
> Hi Domi,
>
> You can do this with your dataHandler object. It has a getStoredData method.
> This method return an array that contain database entries.
>                <visible>
>                        <userobj>
>                                <php><![CDATA[
>                                        #display only when no image given
>                                        $aData = $this->oDataHandler->getStoredData();
>                                        $value = ($aData["main_pic"] == "") ? false : true;
>                                        return $value;
>                                ]]></php>
>                        </userobj>
>                </visible>
>
> Regards,
> Stéphane
>
> -----Message d'origine-----
> De : typo3-project-formidable-bounces at lists.typo3.org [mailto:typo3-project-formidable-bounces at lists.typo3.org] De la part de Domi Garms
> Envoyé : lundi 9 août 2010 08:38
> À : TYPO3 project list for the FORMidable extension
> Objet : Re: [TYPO3-formidable] Store renderlet:upload in database
>
> My error was somewhere in the code above, where I tried some
> customized validation.
>
> But still one question: I took the sample of image upload
> http://formidable.typo3.ug/tutorials/image-upload-preview-deletion.html
> and tried that the database entries should hide/show the upload button
> and show / hide the image instead. But still I struggling with the
> right syntax. Can anybody explain me, how to get the value, is it
> $this->getParams() or how could I reach the database entries?
>
>
> This is what I tried:
>                        <visible>
>                                <userobj>
>                                        <php><![CDATA[
>                                                #display only when no image given
>                                                $aData = $this->getParams();
>                                                $value = ($aData["main_pic"] == "") ? false : true;
>                                                return $value;
>                                        ]]></php>
>                                </userobj>
>                        </visible>
>
>
> How do I have to set up the IMAGE, that it takes the value from the
> database and not only from the upload renderlet?
> Many Greetings
>
>
>
>
> 2010/8/9 Domi Garms <djgarms at gmail.com>:
>> Hello
>>
>> I tried to add a renderlet:UPLOAD into my form. But the value does not
>> store into the database. Im using a datahandler:DB and formidable in
>> the newest 2.x version
>>
>>
>>                <renderlet:UPLOAD name="picture" label="Select an image file, &lt; 2 MB">
>>                        <data targetDir="uploads/" />
>>                        <validator:FILE>
>>                                <extension value="png, gif, jpg, jpeg" message="Image should be
>> either png, gif or jpg." />
>>                                <filesizeKB value="2048" message="Image should weight under 2 MB" />
>>                        </validator:FILE>
>>                </renderlet:UPLOAD>
>>
>>                <renderlet:SUBMIT name="submit" value="submit" label="submit" >
>>                        <validators>
>>                            <validator:STANDARD>
>>                                <authentified>
>>                                        <value>TRUE</value>
>>                                        <message>You must be logged in to complete this form</message>
>>                                </authentified>
>>                        </validator:STANDARD>
>>                        </validators>
>>                </renderlet:SUBMIT>
>>
>>
>> What do I miss here? The upload into the folder is happening, but all
>> data except the upoad field is stored. The sql field name is picture
>> with the type text.
>>
>> Thanks for any hints
>>
>> Domi
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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