Hi all, I’m trying to create a dynamic gallery which is made up of user uploaded images. I’m very new to Wix code, but have made some progress so far.
I currently have:
- a database for the images to be stored in
- a page with a dynamic gallery connected to the database
- an ‘upload files’ button and a ‘submit’ button
So far, I am able to upload an image and it displays in the gallery. However, when I then try to upload another, it just overwrites the first one.
How do I set it so that it uploads to the next entry of the database?
Thanks in advance
James, are you sure you have enough image-fields allocated in your collection? Say you want them to upload 8 pics, you should have 8 image fields in your collection and your form would show 8 image placeholders, each pic connected to its own field.
You can also do 1-n, so you do not set a limit to the amount of pics, people can just keep adding. That needs two collections. I think the day before yesterday Yoav wrote a contribution to this situation here on this forum. Look it up if you think you need that.
The plan is to have a gallery which grows and grows, so I initally added 100 image fields in the collection, but each time I test it to upload another from the front end, it just overwrites the first for some reason. You’ll have to excuse my horrendous lack of coding knowledge, so I’m not sure how to do 1-n…