The belowYour code works for meshould be work,
$banks = array(14=>"bank one", 22=>"bank two);
I then want to construct a simple select form element generally use key value as default value, this WILL NOT work:
$form['drop'] = array(
#id' => "bank_drop",
'#type' => 'select',
'#title' => 'test',
'#options' => $banks,
'#default_value' => 22 // will NOT work!
);
But this works:
$form['drop'] = array(
#id' => "bank_drop",
'#type' => 'select',
'#title' => 'test',
'#options' => $banks,
'#value' => 22 // works!
);
The problem is isif it not working make the string as keys and use it as default value cannot be changed !!!
This was on Drupal 6.15 for more here