Forums

How to see attached picture?

ptr 07 Sep, 2012
Hello,

I want to see attached picture. How to achieve that?
For example: people attached picture using file upload and is possible to see this attached picture somehow for
people who did it? now it just show, that you attached picture and that's all.

any advice is much appreciated.
ptr 09 Sep, 2012
anybody?๐Ÿ™‚
Max_admin 09 Sep, 2012
Hi ptr,

The image path can be found under the $form->files array, try that in a "Custom code" action after the upload:


<img src="<?php echo $form->files['field_name']['link']; ?>" />


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ptr 11 Sep, 2012
Hello Max,

Thank you for your answer.

Do you mean use a Custom code on Submit?
Please check screenshot.
http://postimage.org/image/v4g8kpd8b/

I did it as it is in my screenshot, but it does not work. Also I tried to add in Thank you message, but it does not work too.

Please advice
GreyHead 17 Sep, 2012
Hi ptr,

The screenshot looks OK (though I would add it after the Upload Files action). What do you see in the Page Source where the image should be?

Bob
Max_admin 20 Sep, 2012
Hi ptr,

Sorry for the late reply.

Did you try to check the page source as Bob has suggested ? and did you replace the "field_name" in the code I sent with the real file field name in your form ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ptr 25 Sep, 2012
Hello,

Sorry for my late response as well. I was on vacation.

I moved Custom code after Upload files action and now is working fine. Thank you.

But i have a question..
This is what I want to do:
In page will be a form to upload pictures, after user do it, he will see all these pictures, and then
he must be able to add a description or comments after these pictures.
I understand, that I must add html code in a Custom code and he will be able to add description.
But question, how to assign description with pictures in database(pictures name already saved in DB, but description not)? and how to save it in DB at all? is it possible somehow?

Sorry, if my question is not clear, I can explain again๐Ÿ™‚
GreyHead 26 Sep, 2012
Hi ptr,

Is there one description for each picture or could there be one than one?

Bob
ptr 27 Sep, 2012
Hello Bob,

Yes, each picture will have one description.
GreyHead 27 Sep, 2012
Hi ptr,

Then you can add a textarea element to your form and an extra column of type TEXT to the database table to record the results.

Bob
This topic is locked and no more replies can be posted.