fields('tb') ->orderBy('label', 'ASC') ->execute(); $term_ids = array(); $term_ids[] = 'Select a Content Type'; while ($bundle = $bundles->fetchObject()) { $term_ids[$bundle->term_id] = $bundle->label; } $form['term_id'] = array( '#type' => 'select', '#title' => 'Content Type', '#description' => t('Select a content type to publish. Only data that is mapped to the selected vocabulary term will be published.'), '#options' => $term_ids, '#default_value' => $term_id, '#ajax' => array( 'callback' => "tripal_chado_publish_form_ajax_callback", 'wrapper' => "tripal-chado-publish-form", 'effect' => 'fade', 'method' => 'replace' ), ); // If the user has selected a content type, then we need to // show some filters. if ($term_id) { $form['filters'] = array( '#type' => 'fieldset', '#title' => 'Filters', '#description' => t('Please provide any filters for limiting the records. Only those that match the filters specified below will be published. To publish all records of this type, leave all filters blank.'), '#collapsed' => TRUE, '#collapsible' => TRUE, ); $form['publish_btn'] = array( '#type' => 'submit', '#name' => 'publish_btn', '#value' => 'Publish', ); } $form['#prefix'] = '