Closed bradfordcondon closed 6 years ago
yikes, apparently the api doesnt follow best practices. this is what was recommended by lacey
$organism_options = chado_get_organism_select_options(FALSE);
unset($organism_options[0]);
$form['general_information']['organism'] = [
'#type' => 'select',
'#title' => t('Organism'),
'#options' => $organism_options,
'#multiple' => FALSE,
'#required' => TRUE,
'#prefix' => '<div class="col-lg-6">',
'#suffix' => '</div>',
'#empty_option' => 'Select an organism'
];
In theory, organism validation comes out of the box with the chado_get_organism_select API, but we dont have it. (I've previously written in the validation myself but was told thats not necessary) I'm talking with Tripal team about this.
Related: #38