Read_only input with dynamic default

My situation is as follows: the user is asked to input a country from a list of options (select_one). Each country is located within a continent (there are many countries in each continent), and each country also has a unique country code.

I'm trying to have it such that both continent and country code appear automatically once the user has selected their country, which the user should not be able to change. The solution I've come up with is to set country code and continent to be read only values and to set dynamic default values in the choices tab.

I've figured out to set values as read_only, but not how to get the correct country_code label to show up. I've attached what I have so far. Any help would be greatly appreciated.

test_survey.xlsx (10.4 KB)

I couldn't understand what meant exactly but if you want to link between countries "country" question and "country_code" you use choice filter just add ${country} in choice_filter field with "country_code" question test_survey.xlsx (10.0 KB)

:

Hi @Anthony_Sardain

unfortunatelly it's not possible to use dynamic default values. Please take a look here: Assigning a dynamic default value to a text-type question

Thanks Moteb,

I don't think the solution provided is exactly what I"m looking for.

I would like for the user to input a country and then both continent and country_code both fill in automatically.

So for example, the user will choose Mali, and then continent will default to "Africa" and country code to "MAL".
If they chose Syria, then continent would default to "Middle East" and country code to "SYR".

Hi Grzegorz, thanks for the link. I had seen the thread and had understood that it was indeed possible (albeit tricky perhaps). I just wasn't able to adapt the situation to my case.