[TYPO3-formidable] Store renderlet:upload in database
Domi Garms
djgarms at gmail.com
Mon Aug 9 08:37:33 CEST 2010
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, < 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
>
More information about the TYPO3-project-formidable
mailing list