Show dropdown list of US states if US was selected in country list
To show dropdown list of US states if US was selected in the country list or hide it otherwise, use the following code in Javascript OnLoad event.
Note: Change the values listed in red to match your specific needs.
var ctrlCountry = Runner.getControl(pageid, 'country');
var ctrlState = Runner.getControl(pageid, 'state');
ctrlCountry.on('change', function(e){
if (this.getValue() == 'US'){
ctrlState.show();
}else{
ctrlState.hide();
}
});
See also