Anyone know how to make a drop down menu (from a user input) read from a dataset? I created the drop down menu - inputting all items. Then i created a database - entered all items. I placed user input (drop down menu on page). I connected it to the dataset. I then added a button. I named it Submit and connected it. This is where i am lost. No where can i find how that button knows which item in the drop down menu it has selected. I need it to select that item - and link to another page (i created) PER item.
If you are wanting to populate a dropdown from a dataset which the user can then select on a user input form, then you need to have two datasets on your page.
A dataset that contains the info to be displayed in your dropdown on the user input form.
Another dataset that is used for collecting all the users submitted inputs, which your user inputs should be linked to and the submit button should be linked too to.
The dropdown element will be connected firstly to your dataset for where your user inputs will be submitted. Then underneath that connection in the settings you will then connect the dropdown to your dataset with the dropdown list by using the connect a list toggle.
However, for that you would probably be best in making your own submit button and adding the onClick event in code and adding the Wix location to call within that click function.
So i create two datasets? I dont want user inputting anything into a dataset. I am giving the user options (drop down list). I need the user to choose from my drop down, then after they choose, click submit ---->>> goes to that page.
to do what you are asking would need you to code something using the onChange call for the dropdown element and also have the Wix location to incorporated into that code to, so that after the dropdown’s value is changed the code knows to automatically go to link that is connected to that dropdown value.
However, if you are wanting something like that, then you are better off creating a dropdown that is connected to your dataset with the filtered result added into a table that is expanded from a collapsed view and shows in a table on your page.
Now this table would then show the chosen dropdown item along with the clickable link that the user can then click on to be taken to the appropriate page.
You could have also just searched the forum yourself and found this previous post with two good replies from Yisrael (Wix Admin/Godfather!) for doing a dropdown search with table and then using a dropdown as a menu which also shows you a great example of how to use the onChange and location.to code from what I said earlier. https://www.wix.com/corvid/forum/community-discussion/drop-down-list-select-and-link-to-page#
Thanks sooo much. I can now use the dropdown menu to select an item in my collection. However - how do i make it click to a page in my website - PER item?
If you are using the dropdown change event code sample from Yisrael from this link below, then it should change whenever the user selects the desired dropdown value, although if you have a lot of options then this is not really suitable if the list is too long to fully see and they have to scroll down to see more.
So i read Yisreal post. I tried - but i am not sure where the code goes. I would rather do it with my drop down menu—>>> then have user click -->>> submit button. Not sure if i need that table. Now, i am not a coder and i am not sure where to put his code and if i need to delete other code i put for that table.