You can use Ajax to accomplish this. Drupal 7 has good Ajax support now. On your first select list (city) you'll need to add Ajax information. Then, the second select list can be populated based on the information in the first. You can also even hide the second select list until an option in the first is selected, and I'll explain how to do that in a bit.
First, to set up the basic form:
$form['city'] = array(
'#type' => 'select',
'#title' => t('City'),
'#options' => $options,
'#ajax' => array(
'event' => 'change',
'wrapper' => 'squadron-wrapper',
'callback' => 'mymodule_ajax_callback',
'method' => 'replace',
),
);
$form['squadron_wrapper'] = array('#prefix' => '<div class="squadron-wrapper">', '#suffix' => '</div>');
$form['squadron_wrapper']['squadron'] = array(
'#type' => 'select',
'#title' => t('Squadron'),
'#options' => $squadron_options,
);
This is just the basic setup of the elements. Now you'll need a way to determine what options should go in squadron. First you need to make your Ajax callback identified in 'city' select list. In most cases you can just return the element that wraps the ajax element, in this case $form.
function mymodule_ajax_callback($form, $form_state) {
return $form;
}
Now, when the 'city' select list changes it will rebuild the squadron-wrapper part of the form. Your 'city' value will now be in $form_state['values']. So, when the form is rebuilt we need to determine what options to give to the select list based on the value of 'city'.
// Get the value of the 'city' field.
$city = isset($form_state['values']['city']) ? $form_state['values']['city'] : 'default';
switch ($city) {
case 'default':
// Set default options.
break;
case 'losangeles':
// Set up $squadron_options for los angeles.
break;
}
// If you want to hide the squadron select list until a city is
// selected then you can do another conditional.
if ($city !== 'default') {
$form['squadron_wrapper']['squadron'] = array(
'#type' => 'select',
'#title' => t('Squadron'),
'#options' => $squadron_options,
);
}