• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Get file upload value after form submission using a form plugin

kostigas

New Member
Hello,

I'm using the file_upload element to upload images via a form. After form submission I want to generate thumbnails for the uploaded image. I tried to run a php plugin on after form process, I call a function that generates those thumbnails with the below syntax:

functionName({element_name});

I am sure that the function works properly because if I write directly the path of an image as a function parameter ( eg. functionName('path/to/image') ) then it successfully generates the thumbnails for all the sizes that I want. However If i use the: {element_name} so that this functionality runs for each image that is being uploaded then it returns a notice that the index is undefined.

What am I doing wrong?
 
Thanks, yes I know I can create thumbnails directly from the element settings. However I wish to create many sizes for each uploaded image, in the settings I can see that only one size can be defined. When should I use the {element _name} syntax. I can see that for some elements it works but not for all. For example if I try to get the value of a text field then the syntax works.
 
Simple placeholders {} may not contain what you expect for complex elements (may be an array etc).
So use one of the methods given in the WIKI.
 
Thank you. I found a workaround by refering to the element data as: $this->data['table___element_name'] and it worked.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top