How to create a dynamic select?

Please help!!!

Im having a really hard time with populating a my drop downs with api action data

i set up my tables, apis, dropdown with all the instructions but it still wont work. I've tried so many different variations of instructions and none of them work.

Yes my database is connected.

I make a container, server connection, variables row, header, drop down & set all the settings up.

Is there something im missing.

Please help!!!

Hi Anthony, welcome to Wappler. What do you mean by drop down? Are you talking about in your navigation or a form select?

Can you provide your code here?

i added an image above

That doesn't show your code. We need to see the code for your select element to be able to help further.

Should look something like :;

<select id="selectAddInstanceProgID" class="form-select form-select-sm" dmx-bind:options="optimized_full.data.available_programs" optiontext="prog_name" optionvalue="prog_id" required="" name="selectAddInstanceProgID">
     <option value="">Select Available Program</option>
</select>

You don't have any dmx-bind:options set in the properties panel and what are you trying to do with all that JS on change?

Screenshot 2025-04-16 at 2.33.12 PM

im just trying to get it to show the name of the stores from the data base. idk why, i guess i just followed the wrong instructions

Yeah, you aren't even close with what you have. Select your select element in your list and add the properties there. You don't need to set a value or any on change function. Just simply select your menu item and pick the options in the properties panel. Very easy.

1 Like

i've spent two days trying to do this :woozy_face: but like full work time just trying to do this. I still haven't been able to do it but its something I still need to do. Anyway you can example code

I don't understand what you mean that its that simple when i was watching tutorials.

Link api data to dropdown menu is all im trying to do:

Select Stores -> list of stores from data base(api connection)

Select Department -> select department based off of the store id

Which tutorials are you watching? I am not aware of any Wappler ones that show this as it is pretty basic. See my code and screenshot above.

Again, just select your menu item and in the properties panel under 'Select Options' just select your data source and the text/value you need using the lightning bolt icons. No need to hand code anything.

2 Likes

I think this is the documentation you're looking for:
https://docs.wappler.io/t/dynamic-select-menu/2867

May I suggest you erase your select and try again from scratch? Start with the 1st one "Select Store", don't bother with your 2nd one until the 1st one's working properly.

1 Like

thank you guys so much!!

My brain was about to implode... 2 days later but I will have to try it tomorrow because I was on the verge of tears lol

I knew it was something simple all along but it did take me down a deep rabbit hole of how ai can make my sites. Funny how things work,