title: drupal - add select/option list to a form
body: <p>I am a bit confused. I have created a simple form with a one text box and a submit button.  Now I want to add a select/option dropdown box of taxonomy terms, using the taxonomy_get_vocabularies() function.</p>
  
  <pre><code> $vocabularies = taxonomy_get_vocabularies('my_type'); 
  </code></pre>
  
  <p>My question is how do I get vocabulary list onto form "the Drupal way".  The way Drupal defines form seem quite rigid.  Also how could I make this conditionl, say on existence of relevant taxonomy terms.</p>
  
  <pre><code>function my_form_name($form_state) {
  
  // A Short question.
    $form['title'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('Question'),
      '#default_value' =&gt; $node-&gt;title,
      '#required' =&gt; TRUE,
      '#weight' =&gt; 1,
      '#description' =&gt; t('A text box goes here '),   
    );
  
    $form['submit'] = array(
      '#type' =&gt; 'submit',
      '#value' =&gt; t('submit'),
      '#weight' =&gt; 7,
    );
  
    return $form;
  </code></pre>