function taxonomy_test_form_alter in Drupal 7
Implements hook_form_alter().
File
- modules/
simpletest/ tests/ taxonomy_test.module, line 90 - Test module for Taxonomy hooks and functions not used in core.
Code
function taxonomy_test_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'taxonomy_form_term') {
$antonym = taxonomy_test_get_antonym($form['#term']['tid']);
$form['advanced']['antonym'] = array(
'#type' => 'textfield',
'#title' => t('Antonym'),
'#default_value' => !empty($antonym) ? $antonym : '',
'#description' => t('Antonym of this term.'),
);
}
}