I have been working on a contact form that allows multiple file attachments using jquery. My form currently has an individual file input that works just fine however I would like to add a link which will create an additional input field. I’ve been working at it for a few days now and scanning for possible solutions that would fit my criteria.
The problems i’m having are
1)My field is being multiplied by two when i hit the link (I understand why this happens) but after trying different solutions am unable to resolve it.
2)I have my file field styled using divs and am trying to figure out how I can use the “onchange” event to pass file names to my pseudo file field and cloned fields.
I’ve put together a jsFiddle that I’m hoping will better describe my issues and hopefully someone can lend their thoughts on this process.
Cheers!
In my original question I was perhaps trying to make things a little too fancy for my own good but have decided to simplify the process, remove styling from my file inputs and deal with the default display across browsers.
The code I ended up using can be found in this fiddle.
http://jsfiddle.net/schwiegler/8vaFk/19/