Buy Now
Sign in

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

jvidalbac , December 29 2018, 16:41
J
jvidalbac 6
December 29 2018, 16:41 #382457
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 8
January 03 2019, 02:50 #382532
I think the selected values only works on page load.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
U
usainteanne 11
January 15 2020, 19:59 #390735
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 8
January 16 2020, 03:38 #390738
At the time, 12 months ago, it was correct. Has been fixed since.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store