Forums

Multiple mail attachments

noodle 29 Oct, 2009
Hi, First off congratulations on the software, have wasted days finding something that works!!
I need the user to be able to upload numerous files to me via the form. The amount of files will be unknown, approx 1-15. Is there a way to put 1 file upload box on the form, with an option to add another, then another etc. I dont want to put 15 file upload boxes on the form. I hope you understand what I am trying to do. Any help would be greatly appreciated!!

Regards
GreyHead 29 Oct, 2009
Hi Noodle,

Sure, you can create a bunch of file inputs and then reveal them one at a time with a little JavaScript. The code is here a few times or easy to find with a little Googling.

Bob
noodle 29 Oct, 2009
Hi Bob,
Wow what a fast reply! Unfortunately I have searched and not found anything. Maybe I am just in the wrong words in the search but I am new to this and have no knowledge of JS either. All the other parts of the form I understand and have had working..this is the last bit. Is there anyway you can point me to the code to this problem and where to insert it, I know you must have loads of newbies asking you questions all day and I really apologise!!

Many Many thanks
nml375 29 Oct, 2009
Hi Noodle,
There's a rough example here: http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=14287&p=32041#p32041 You'd have to replace the onChange event in the select-input with some button with an onClick event though.

Also, depending on what post-processing (what to do with the submitted data/files), "ajax" uploads might be an option. A word of advice and warning though, these kind of forms are not trivial to get working properly, so for a quick solution, multiple hidden/disabled file inputs would probably be better.

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