function taxonomy_test_form_taxonomy_term_form_alter

Implements hook_form_FORM_ID_alter().

File

drupal/core/modules/system/tests/modules/taxonomy_test/taxonomy_test.module, line 92
Test module for Taxonomy hooks and functions not used in core.

Code

function taxonomy_test_form_taxonomy_term_form_alter(&$form, $form_state, $form_id) {
  $term = $form_state['controller']
    ->getEntity($form_state);
  $antonym = taxonomy_test_get_antonym($term->tid);
  $form['advanced']['antonym'] = array(
    '#type' => 'textfield',
    '#title' => t('Antonym'),
    '#default_value' => !empty($antonym) ? $antonym : '',
    '#description' => t('Antonym of this term.'),
  );
}