#LimitUserSubmissions #Database
Hello everyone, I want to thank you in advance for any help you can offer me. I am very new to website making and have no experience with code.
What I am trying to accomplish: A website where users register, can submit up to 4 screenshots where I display them on the website. only up to 4 pictures in any amount of submissions
What I have accomplished so far: Through tutorials, I managed to get the database and submission form set up where a person can register and submit. The image then displays in a gallery on the site.
What I still need: I need to be able to limit each user to only 4 submissions active. I want to prevent submissions exceeding 4. However, I would like them to be able to continue to submit more after I delete any previous submissions after a period of time.
You want to have a user upload up to 4 pictures per submission and unlimited submissions . Or only up to 4 pictures in any amount of submissions?
I have two ideas,
First add four upload buttons and let user either update image or disable it if there’s already a file there.
Second (requires more code) add only 1 upload button, use code code to determine which entry it is, so for example add an upload button and text that says like (this is your 1 entry or You’ve reached the limit) and let the code calculate where to save the image.
Awesome! I think I would prefer the very first idea you listed. So in theory, in their member area, they could select their 4 screenshots and upload them. When they want to add new images, they replace their current image?
My questions regarding this: Currently I have it set to where the newest submissions to the database appear at the front of the displayed gallery. Is the option of updating them still allow for updated images count as a new image to appear at the front of the displayed gallery or would it just replace the image in the current spot?
Secondly, is this doable without using the code typing system? I checked the current upload button but I didn’t see an option somewhere to set a specific setting to update image or disable.
Thank you so much
@cubansnare13 You will have in your database 4 fields, example field 1, field 2, field 3 and field 4, then each uploadButton will be connected to each field. How are you creating the gallery?
@carlosgalvarez Thank You! Is there anything I need to do further to make sure each time they submit in example field 1, that it doesnt add a new record but instead update it like you mentioned. I didn’t see that option.
@cubansnare13 It’s done automatically so it will override it automatically. Just link your dataset to your button and add the submit. and then you dataset to your gallery or image the same way.
@carlosgalvarez THANK YOU so much Carlos! I got it working as you mentioned! I had to set a few more permissions to allow members to modify their own content. I appreciate all of your help!
@carlosgalvarez if on wanted to take up your second option:
Second (requires more code) add only 1 upload button, use code code to determine which entry it is, so for example add an upload button and text that says like (this is your 1 entry or You’ve reached the limit) and let the code calculate where to save the image.
How would you go about doing that?