I have a Simple Add Product page where i create a Product in a Steps.
In the first step i create the product when i click 'Next step' the product gets saved in my database etc. This all works fine, On the next step i can upload multiple images. (This will be done with Dropzone: http://www.dropzonejs.com/ Or https://github.com/kartik-v/bootstrap-fileinput . It will probably be bootstrap-fileinput because dropzone creates post-requests for every image instantly) .
Question:
I understand how to upload multiple images & link them to my product.
But i also want to add additional Fields to every image . Like 'Alt-info' & 'sort_order' . But i have no clue how to start on this. Because you never now how many images will be uploaded etc. Can someone point me in the right direction on how to start implementing this?
I am open for all types of suggestions. My endgoal is to have something Like Wordpress has, where it opens A modal where you can upload images and add Alt-info etc instantly.
It's been a while since i myself have used dropzone, back than, as far as i know it wasn't possible to assign alt values and order values.
One way to do it is to store default values, so you could give alt values a default name (perhaps the file name), and give each order a value of 0.
Than after uploading is finished, and the page is reloaded, display the images, show the input field to alter the alt value, and display arrows to do either order+1 or order-1
@Qlic Thanks for your reaction. yes i assumed it wouldn't be possible with Dropzone. With Bootstrap-fileinput it might be possible because it doesn't make post requests instantly. Your solution would indeed work, but that is what i am trying to avoid because it is not really user-friendly. Because a user has to do a lot of actions to do that.
@ohfss you're indeed misunderstanding the question. I have no problems with the file-uploads itself . I just want to add aditional forms to each image where i can specify additional date . For example Alt-information on each image