function taxonomy_test_form_alter
Implements hook_form_alter().
File
-
modules/
simpletest/ tests/ taxonomy_test.module, line 90
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.'),
);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.