Page 1 of 1

choices values

Posted: Thu Feb 06, 2014 9:09 am
by paparazia
Hi, I have a problem of return value in a dropdown list.
In fact, I have two dropdown lists related I load with RPG features, but the problem I have is that
the second list retains the last value read and I would like it to be empty until that we choose a new value in this second list.

Re: choices values

Posted: Thu Feb 06, 2014 11:30 am
by Scott Klement
I'm not sure that I follow you. Are you saying that you set your drop down to blank, but Profound UI is changing it to the last value in the list?

Have you ensured that blank is one of the allowed choices?

Re: choices values

Posted: Thu Feb 06, 2014 12:41 pm
by paparazia
no no I selected from an initial list of countries and in a second city.
In both lists have IDs that are returned as a return value.

The problem I have is the following:

when I choose for example FRANCE as a country and as a city ABANCOURT, return values ​​are respectively 'FR' and 5.

When I choose Senegal as a country, the second list is always worth 5.
when I want it to be blank until I choose a city to Senegal.

Re: choices values

Posted: Thu Feb 06, 2014 4:17 pm
by Scott Klement
So when you choose Senegal (in your example), you must have some code that is running to re-load the cities list, correct? when that code runs, can you blank out the variable connected to the 'value' property of the cities? That way, it won't be set to 5 anymore, right?

Re: choices values

Posted: Fri Feb 07, 2014 5:25 am
by paparazia
In my example, when I choose Senegal without any city, There are white at the second drop-down list, which is correct.
But the value of this second list (if it appears) always keeps the ID
5 matching ABANCOURT (the last selected city).

What is normal is that whenever I select a new country, the values ​​of the second list should be empty ('choices and the choices values)

Re: choices values

Posted: Fri Feb 07, 2014 9:43 am
by Alex
See if the following webinar will help:
http://www.profoundlogic.com/webinars.r ... =305893618

I believe In the webinar, they demonstrate how to relate 2 dropdowns. They go through an example that is similar to yours.

Re: choices values

Posted: Wed Feb 12, 2014 6:26 am
by paparazia
Thank you alex,
I can already link the two drop-down lists but my problem must be a problem with javascript.

In fact, when I choose a city, the name of the city is always kept even if I change the country.

However it is hidden at the list, you see only white.

Is it possible to empty the contents of the second list every time you move to another country?

Re: choices values

Posted: Wed Feb 12, 2014 6:29 am
by paparazia
when i change Country
when i change Country
Capture.PNG (17.53 KiB) Viewed 1287 times