function tripal_cv_select_form
1.x tripal_cv_admin.inc | tripal_cv_select_form() |
Purpose: Provides the actual "Select CV" form on the Update/Delete Controlled Vocabulary page. This form also triggers the edit javascript @todo Modify this form to use Drupal AJAX
Related topics
1 string reference to 'tripal_cv_select_form'
- tripal_cv_edit_page in tripal_cv/
includes/ tripal_cv_admin.inc - Purpose: Provides the form for Updating and Deleteing existing chado controlled vocabularies (See chado cv table)
File
- tripal_cv/
includes/ tripal_cv_admin.inc, line 22
Code
function tripal_cv_select_form() {
// get a list of db from chado for user to choose
$sql = "SELECT * FROM {cv} WHERE NOT name = 'tripal' ORDER BY name ";
$results = chado_query($sql);
$cvs = array();
$cvs[] = '';
while ($cv = db_fetch_object($results)) {
$cvs[$cv->cv_id] = $cv->name;
}
$form['cvid'] = array(
'#title' => t('Controlled Vocabulary/Ontology Name'),
'#type' => 'select',
'#options' => $cvs,
'#ahah' => array(
'path' => 'admin/tripal/tripal_cv/cv/edit/js',
'wrapper' => 'cv-edit-div',
'effect' => 'fade',
'event' => 'change',
'method' => 'replace',
),
);
return $form;
}