Advertisement
DrupalCustom

535

Feb 16th, 2012
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. function _ajax_example_get_second_dropdown_options($key = '') {
  2.   $options = array(
  3.     t('String') => drupal_map_assoc(array(t('Violin'), t('Viola'), t('Cello'), t('Double Bass'))),
  4.     t('Woodwind') => drupal_map_assoc(array(t('Flute'), t('Clarinet'), t('Oboe'), t('Bassoon'))),
  5.     t('Brass') => drupal_map_assoc(array(t('Trumpet'), t('Trombone'), t('French Horn'), t('Euphonium'))),
  6.     t('Percussion') => drupal_map_assoc(array(t('Bass Drum'), t('Timpani'), t('Snare Drum'), t('Tambourine'))),
  7.   );
  8.   if (isset($options[$key])) {
  9.     return $options[$key];
  10.   }
  11.   else {
  12.     return array();
  13.   }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement