How do I create a script based on a selection from a dropdown list?

How do I create a script based on a selection from a dropdown list?

I want to create a script in a creator form so that when a user selects a city from a dropdown list, another dropdown list appears with all of the neighborhoods in the selected city.  At this moment I am stuck trying to create a Actions on User Input script and I can't make an If condition that recognizes the dropdown items as variables.  Thanks for any help you can give me.