Creating an item sign-up

How can i create an item sign-up on my website so that when somebody comes on to sign up to bring a certain item to a specified event, after selecting and confirming that item, it will be hidden so that no one else brings it also… I have looked all over but cannot find anything like this.

Thanks!

Hello. I am moving this post over to coding with Velo so that you can get some help with hiding the elements.

To be able to offer you ideas, you will also want to post what you have so far. It’s okay if you haven’t written any code yet, but let the community know what you do have set up and show us how you are currently displaying your items, signup form, events, etc.

What i have set up is a database with the different options. I can display that in a data set. I know how to make filters so people can find what they want within the data. However what i need is to allow people to select one of the options available and submit their choice. Then by submitting, it needs to hide what they chose from the data.

Maybe I’m doing it wrong and i shouldn’t use a database, but i don’t know. I’m open to suggestions…

Thank you!

Okay, so this is what I think you mean…

You have all the items stored in a database
You are able to display the items by creating and connecting to a dataset in a repeater

My questions at this point:
Does the database have a column to indicate whether the item has been selected or not? This could be a boolean (true/false) or a number field (if say there are 5 items)

Have you set up a way to select an item yet or are you just displaying them in a repeater so far? (a checkbox, button, etc)

The database does not have a column, and i am only displaying them in a repeater. I wasn’t sure if i should put a checkbox on the items, or if i should do something different. I like the checkbox idea, with an indicator that they have selected it, but then i am not sure how to create the indicator or how to then hide the items after they submit…

Okay, sorry for more questions but I want to make sure I understand before I send you some ideas and docs.

Every user who visits the site should see the same options?
OR
User 1 visits the site and picks item 1. User 2 visits the site and should not see item 1 as an option bc user 1 already picked it.

And yes - you can add any element you want as far as selection is concerned. To add a checkbox to the repeater drag the element over your repeater element and you will see “Attach to Item”

Then in the code on submit, you can use the dataset API to remove the selected item

Here is the link to the Wix Dataset API

I would be option 2,
“User 1 visits the site and picks item 1. User 2 visits the site and should not see item 1 as an option bc user 1 already picked it.”

I will check out the link! Thank you so much for helping me with this.

No problem at all! You will get there for sure.

So… since your user workflow is option 2, you will need to have a way in the database to indicate that an item is no longer available. This way on a new page load/visit - only available options will appear.

You can do this in whatever way makes sense for your data but you will need a new column:
A boolean - if there is only 1 of each item this can work bc it’s true or false. Then in your dataset, make sure that you only load TRUE
A number - if there are multiple items you can decrease the count on each selection and only load items that are > 0
Text - You can create your own text that you use like “Available” / “Unavailable”. Similar to the boolean, but you can choose whatever you want for the filters

Then on your page, on select/submit make sure to modify the data in the database. (Set the boolean to false, decrease the count, etc)

Good luck and let up know how it’s going!

a boolean seems like it would be the best option. I’m exactly sure what the code would look like, or how to create it. Do you know of an example I could look at or something?

I think my biggest problem is that i don’t know how to implement most of these ideas…

Adding a column to your database does not involve any code. Where you set up the initial items collection simply add another field and define it for your case. About the content manager

Then, in the page where you connected your dataset you can add a filter (also no code yet)

Next, drag your checkbox onto your repeater and attach to the repeater, then connect the checkbox to the boolean in your dataset (no code yet)

Now, it’s time to do a little learning. You can search the forum here or look through some of the available velo tutorials. For example, this article which explains how to react to events (such as a button click)

If you are newer to coding start with one small problem at a time and build from there.

Ex. Make a button and capture the click event in your code

After you know you can tell in the code that you clicked the button, next you will want to learn how to know that a checkbox has been clicked and so on…
Checkbox docs for velo

You may want to find a simple javascript tutorial to go through. The logic/way to think will still apply in the Velo environment

ok wow! Thanks for your help. This is definitely over my head, but I’ll try my best.

@mycreativespot No problem and if learning to code isn’t part of your happy place. You can always consider hiring a trusted Velo dev to get into all that for you.

Som learning resources:
Velo API reference: https://www.wix.com/velo/reference/api-overview (
Velo Learning Center: https://learn-code.wix.com/en/getting-started-guides/developers-guide
Basics: https://support.wix.com/en/velo-by-wix/basics
Free Udemy: https://www.udemy.com/course/corvid-for-wix-part-1-editor-and-corvid-basics/
https://www.udemy.com/course/corvid-for-wix-part-2-user-inputs-and-data-basics/
Examples: https://www.wix.com/velo/examples