function redhen_contact_contact_delete_form in RedHen CRM 7
Form callback: confirmation form for deleting a contact.
Parameters
$contact: The contact object to be deleted.
See also
1 string reference to 'redhen_contact_contact_delete_form'
- redhen_contact_menu in modules/
redhen_contact/ redhen_contact.module - Implements hook_menu().
File
- modules/
redhen_contact/ includes/ redhen_contact.forms.inc, line 165 - Forms for creating, editing, and deleting contacts.
Code
function redhen_contact_contact_delete_form($form, &$form_state, $contact) {
$form_state['redhen_contact'] = $contact;
// Ensure this include file is loaded when the form is rebuilt from the cache.
$form_state['build_info']['files']['form'] = drupal_get_path('module', 'redhen_contact') . '/includes/redhen_contact.forms.inc';
$form['#submit'][] = 'redhen_contact_contact_delete_form_submit';
$wrapper = entity_metadata_wrapper('redhen_contact', $contact);
$form = confirm_form($form, t('Are you sure you want to delete %title?', array(
'%title' => $wrapper->full_name
->value(),
)), entity_uri('redhen_contact', $contact), '<p>' . t('Deleting this contact cannot be undone.') . '</p>', t('Delete'), t('Cancel'), 'confirm');
return $form;
}