Forum Moderators: coopster

Message Too Old, No Replies

Capturing Name of Uploaded File

         

SeanF

2:51 am on Nov 7, 2022 (gmt 0)

5+ Year Member Top Contributors Of The Month



I have a form that allows users to add a number of names to a table from which badges for a trade show will be printed. Each name record is a text input field like the following:
<input type='text' onkeypress='return noenter()' name='name[$i]' size=10 maxlength=25 value='$name'>

Additionally, the user can upload a picture file that will will be printed on the badge. Ideally, for every line that has a name field, I would like a button which calls a script allowing the user to upload a picture, without posting the entire form.

What's the best way to do this? Is there a javascript plugin that would suffice?

Thanks

csdude55

8:27 pm on Nov 18, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Sorry for the late reply, I'm just now seeing this.

If I'm reading this correctly, you want there to be several rows of input fields for the name, and then a corresponding image upload that is somehow connected to that corresponding input fields.

Right?

Without seeing the processing side of it, can you not simply use "name[$i]" for the name and then "image[$i]" for the image name? Then when you process, just refer back to the $i number.

FWIW, I wanted a nicer way for users to upload images and stumbled across "fineuploader". It's EOD now and was pretty complicated to set up, but I was really happy with the results and it might make your life easier.

A few years back I created a thread outlining everything I did to set it up, but I can't find it now. Maybe @coopster can find it? It's probably under the General forum, around mid-2018.