Hi everyone,
My goal here is as follows: based on which option the user chooses from the first dropdown menu, a corresponding dropdown menu will appear. And the panels & graphics below will have queries based on the value passed from the second dropdown.
In other words, if I choose the TI40 from the first dropdown menu, then only the dropdown associated with it - the one that has 'depends=$show_ti40$"' - should appear. And a value chosen from the latter will influence the panels and graphics.
But this isn't really working. When I choose TI40, the dropdown menu for it does not appear. It only works as expected for ZV60 works.
What am I doing wrong? Or is there a better way to do it?
Look at this with the <change> element
<form>
<label>VarDD</label>
<fieldset submitButton="false">
<input type="dropdown" token="appCode">
<label>Choose appcode</label>
<choice value="ti40">TI40</choice>
<choice value="zv60">ZV60</choice>
<choice value="mqp0">MQP0</choice>
<default>ti40</default>
<change>
<eval token="show_ti40">if($value$="ti40", "true", null())</eval>
<eval token="show_zv60">if($value$="zv60", "true", null())</eval>
<eval token="show_mqp0">if($value$="mqp0", "true", null())</eval>
</change>
</input>
</fieldset>
<row>
<panel depends="$show_ti40$">
<html>
ti40 IS ON
</html>
</panel>
<panel depends="$show_zv60$">
<html>
zv60=ON
</html>
</panel>
<panel depends="$show_mqp0$">
<html>
mqp0=ON
</html>
</panel>
</row>
</form>
Hi,
I see, so that's how it would work with panels. In a similar way, how could if I make subsequent dropdown menus appear based on input from the first dropdown menu?
Thanks
depends="$token$" syntax can be used on many elements, row/panel/input/search, so just set/clear tokens as necessary in your set/eval token setter statements to show hide the elements you want - you can be as dynamic as you like.
Hi @RylanBodrigueC,
for my knowledge, you can use the depends on option only for panels not for inputs.
But you can pass the token from the first input to the second one.
Please, next time, share you code in the "Code Sample" panel, not as screenshot because it is un'useful.
Ciao.
Giuseppe