function taxonomy_term_confirm_delete

7.x taxonomy_term_confirm_delete($form, &$form_state, $tid)

Form builder for the term delete form.

See also


Related topics

1 call to taxonomy_term_confirm_delete()
taxonomy_form_term in drupal/modules/taxonomy/
Form function for the term edit form.


drupal/modules/taxonomy/, line 873
Administrative page callbacks for the taxonomy module.


function taxonomy_term_confirm_delete($form, &$form_state, $tid) {
  $term = taxonomy_term_load($tid);

  // Always provide entity id in the same form key as in the entity edit form.
  $form['tid'] = array(
    '#type' => 'value',
    '#value' => $tid,

  $form['#term'] = $term;
  $form['type'] = array(
    '#type' => 'value',
    '#value' => 'term',
  $form['name'] = array(
    '#type' => 'value',
    '#value' => $term->name,
  $form['vocabulary_machine_name'] = array(
    '#type' => 'value',
    '#value' => $term->vocabulary_machine_name,
  $form['delete'] = array(
    '#type' => 'value',
    '#value' => TRUE,
  return confirm_form($form, t('Are you sure you want to delete the term %title?', array('%title' => $term->name)), 'admin/structure/taxonomy', t('Deleting a term will delete all its children if there are any. This action cannot be undone.'), t('Delete'), t('Cancel'));