confirm_form

  1. drupal
    1. 4.7
    2. 5 system.module
    3. 6 system.module
    4. 7 system.module
Versions
4.7 confirm_form($form_id, $form, $question, $path, $description = NULL, $yes = NULL, $no = NULL, $name = 'confirm')
5 – 7 confirm_form($form, $question, $path, $description = NULL, $yes = NULL, $no = NULL, $name = 'confirm')

▾ 23 functions call confirm_form()

aggregator_admin_remove_feed in modules/aggregator.module
block_box_delete in modules/block.module
Menu callback; confirm deletion of custom blocks.
comment_delete in modules/comment.module
Menu callback; delete a comment.
comment_multiple_delete_confirm in modules/comment.module
List the selected comments and verify that the admin really wants to delete them.
contact_admin_delete in modules/contact.module
Category delete page.
filter_admin_delete in modules/filter.module
Menu callback; confirm deletion of a format.
locale_admin_manage_delete_form in modules/locale.module
User interface for the language deletion confirmation screen.
locale_admin_string_delete in modules/locale.module
Delete a string.
menu_disable_item in modules/menu.module
Menu callback; hide a menu item.
menu_item_delete_form in modules/menu.module
Menu callback; delete a single custom item.
menu_reset_item in modules/menu.module
Menu callback; reset a single modified item.
node_delete_confirm in modules/node.module
Menu callback -- ask for confirmation of node deletion
node_multiple_delete_confirm in modules/node.module
node_revision_delete in modules/node.module
Delete the revision with specified revision number. A "delete revision" nodeapi event is invoked when a revision is deleted.
node_revision_revert in modules/node.module
Revert to the revision with the specified revision number. A node and nodeapi "update" event is triggered (via the node_save() call) when a revision is reverted.
path_admin_delete_confirm in modules/path.module
Menu callback; confirms deleting an URL alias
profile_field_delete in modules/profile.module
Menu callback; deletes a field from all user profiles.
search_wipe_confirm in modules/search.module
Menu callback: confirm wiping of the index.
user_admin_access_delete in modules/user.module
Menu callback: delete an access rule
user_edit in modules/user.module
_forum_confirm_delete in modules/forum.module
Returns a confirmation page for deleting a forum taxonomy term.
_taxonomy_confirm_del_term in modules/taxonomy.module
_taxonomy_confirm_del_vocabulary in modules/taxonomy.module

Code

modules/system.module, line 1264

<?php
function confirm_form($form_id, $form, $question, $path, $description = NULL, $yes = NULL, $no = NULL, $name = 'confirm') {

  $description = ($description) ? $description : t('This action cannot be undone.');
  drupal_set_title($question);
  $form['#attributes'] = array('class' => 'confirmation');
  $form['description'] = array('#value' => $description);
  $form[$name] = array(
    '#type' => 'hidden',
    '#value' => 1,
  );

  $form['actions'] = array(
    '#prefix' => '<div class="container-inline">',
    '#suffix' => '</div>',
  );
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => $yes ? $yes : t('Confirm'),
  );
  $form['actions']['cancel'] = array('#value' => l($no ? $no : t('Cancel'), $path));
  return drupal_get_form($form_id, $form, 'confirm_form');
}
?>