1 taxonomy_test.module | taxonomy_test_form_alter(&$form, $form_state, $form_id) |
Implements hook_form_alter().
File
- core/
modules/ simpletest/ tests/ taxonomy_test.module, line 89 - 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.')
);
}
}