Populate a Chosen select list from a view
You can programmatically invoke a view to retrieve data and process it as needed:

  // Example select form array
  $form['my_selectbox'] = array(
    '#title' =&gt; t('My Select Label'),
    '#type' =&gt; 'select',
    '#description' =&gt; t('My select label.'),
    '#options' =&gt; array(),
  );

  $view = views_get_view("my_view_machine_name");

  //use "default" for default display
  $view-&gt;set_display("my_view_display_machine_name"); 

  // @TODO: Alter any other view properties 
  // (e.g. exposed_input, offset, etc.) as needed

  // Pre execute &amp; execute view query
  $view-&gt;pre_execute();
  $view-&gt;execute();

  // $view-&gt;result contains an array of row objects inside the view.
  // the properties will vary based on your view
  foreach ($view-&gt;result as $row) {
    $form['my_selectbox']['#options'][$row-&gt;nid] = $row-&gt;node_title;
  }