Dropdown: Values to be cheked (selected values) after reload

jvidalbac 29 Dec, 2018
I have a dropdown2 in my form that is filled with the data obtained from a database with a read_data after a reload action activated by another dropdown1.This action is done correctly but I want the default value shown in the dropdown2 after the reload action to be a certain value.

I enter this value in the "selected values" field of dropdown2 but it is ignored after the reload action.

For example:
Dropdown values obtained from the database:
1 = Test 1
2 = Test 2
3 = Test 3
.....

Selected values:
2

Result:
Test 1

You always get the first value "Test 1" even if we try to change selected values by 1, 2, 3, ....

This behavior only occurs after a reload action.

Please, How can I indicate to the dropdown the value I want to show after the reload action?
healyhatman 03 Jan, 2019
I think the selected values only works on page load.
liamhanks 15 Jan, 2020
This is actually incorrect, @healyhatman. It is possible to reload the selected values on field reload. You just need to set the value as a variable in the reload event, and then in the Selected Values box on the field, use {var:your_var_name} to get the selected value.
healyhatman 16 Jan, 2020
At the time, 12 months ago, it was correct. Has been fixed since.
This topic is locked and no more replies can be posted.