Has the process for creating dependent dropdowns changed in newer versions of wappler?
Have followed the instructions on the posts available and they do not work.
The second dropdown doesn’t seem to be triggered with the get variable when the first one is changed.
Not sure I fully understand the question but I know what the steps would be.
Could you show your client side code for dropdown 1 and dropdown 2 so we can see what may be wrong.
Please explain in details what exactly are you trying to achieve, so we can answer your question.
<div class="select">
<label>
<select id="ISIC_level1f" name="ISIC_level1" dmx-bind:options="ISIC_level1.data.ISIC_Level1" optiontext="description" optionvalue="code">
<option value="">Select Value</option>
</select>
</label>
</div>
<div class="select">
<label>
<select id="ISIC_level2f" name="ISIC_level2" optiontext="description" optionvalue="code" dmx-bind:options="ISIC_level2.data.ISIC_Level2">
</select>
</label>
</div>
The first dropdown loads the elements fine with no issue.
The second dropdown never loads.
I have the query to load the dropdowns setup the second drop down has a condition expecting a get variable called alevel
The two serverconnect strings are below:
<dmx-serverconnect id="ISIC_level1" url="/dmxConnect/api/ISIC/Level1.php"></dmx-serverconnect>
<dmx-serverconnect id="ISIC_level2" url="/dmxConnect/api/ISIC/Level2.php" noload dmx-param:alevel="form1.ISIC_level1f.value"></dmx-serverconnect>`Preformatted text`
Use the backtick character to add your code in a block, so in your post add a new line with 3 backticks then a new line then your code then a new line with another 3 backticks to close it.
I edited it for you so you can see how it is done.
thanks really appreciate that was wondering how it was done.
Well thats looking ok so far, can you send a screenshot of the Level2.php steps as well as the Global $_GET and $_POST
The only issue i can see is that the second server connect starts as noload so it still needs to be loaded, but lets see your steps and then we can work that out.
Basically on change of dropdown 1, tell server connect ISIC_level2 to load, which will then get the param from dropdown 1, which it would not have had if you had loaded ISIC_level2 on page load.
You just need to add an on changed dynamic event to this that tells it to load ISIC_level2
You can do it through the GUI
- Click on the select
ISIC_level1 - Scroll down the Dynamic Events
- Add a Data > on change event to load server connect
ISIC_level2
That works thank you so much…
I actually had tried that before so gave up on loading it this way, thought I saw somewhere that it would load automatically…
Thank you…
<div class="select">
<label>
<select id="ISIC_level1f" name="ISIC_level1" dmx-bind:options="ISIC_level1.data.ISIC_Level1" optiontext="description" optionvalue="code" dmx-on:changed="ISIC_level2.load({alevel: value})">
<option value="">Select Value</option>
</select>
</label>
</div>
<div class="select">
<label>
<select id="ISIC_level2f" name="ISIC_level2" optiontext="description" optionvalue="code" dmx-bind:options="ISIC_level2.data.ISIC_Level2">
</select>
</label>
</div>
It can pull the param automatically, but each time the first dropdown changes value it has to call the same server action again and again, which it can not know without an on changed.
understood thank you again. wappler is pretty great and you guys helping out are too
Hi Ben, great video as always.
You used several different queries for the employee, manager, address etc. I have always tended to use one query with many JOINs, which can get quite complicated. Is there a reason for using separate queries or is it simply a personal preference?
I put the same comment on the YouTube video.
Hi Neil, thank you for your kind words.
I don't think that there are advantages or disadvantages either way except simplicity. So, yes, it was personal preference when trying to explain to less experienced users.

