scaffolding_example_delete_confirm

Versions
7
scaffolding_example_delete_confirm(&$form_state, $record)

Build the delete confirmation form.

A simple wrapper around Drupal's core confirm_form() function. Adds a value field to store the ID of the record being deleted.

See also

scaffolding_example_delete_confirm_submit()

@see confirm_form()

Related topics

Code

developer/examples/scaffolding_example/scaffolding_example.admin.inc, line 330

<?php
function scaffolding_example_delete_confirm(&$form_state, $record) {
  $form['record_id'] = array(
    '#type' => 'value',
    '#value' => $record['record_id'],
  );

  return confirm_form($form,
    t('Are you sure you want to delete %title?', array('%title' => $record['title'])),
    isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/scaffolding_example',
    t('This action cannot be undone.'),
    t('Delete'),
    t('Cancel')
  );
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.