You are here

function multifield_delete_form in Multifield 7

Same name and namespace in other branches
  1. 7.2 multifield.admin.inc \multifield_delete_form()
1 string reference to 'multifield_delete_form'
multifield_menu in ./multifield.module
Implements hook_menu().

File

./multifield.admin.inc, line 169
Administation pages and forms for the Multifield module.

Code

function multifield_delete_form($form, &$form_state, $multifield) {
  $form['#multifield'] = $multifield;
  $description = '<div class="messages warning">';
  if ($fields = _multifield_get_usage_summary($multifield->machine_name)) {
    $description .= t('The following fields and their respective data will also be removed:') . theme('item_list', array(
      'items' => $fields,
    ));
  }
  $description .= ' ' . t('This action cannot be undone.') . '</div>';
  return confirm_form($form, t('Are you sure you want to delete this multifield type?'), 'admin/structure/multifield', $description);
}