function name_custom_format_delete_form in Name Field 6
Same name and namespace in other branches
- 7 name.admin.inc \name_custom_format_delete_form()
Custom name format deletion form.
2 string references to 'name_custom_format_delete_form'
- name_custom_format_edit in ./name.admin.inc 
- Page to edit a custom format.
- name_menu in ./name.module 
- Implementation of hook_menu().
File
- ./name.admin.inc, line 275 
- General administration functions.
Code
function name_custom_format_delete_form($form_state, $ncfid) {
  $name = db_fetch_array(db_query("SELECT * FROM {name_custom_format} WHERE ncfid = %d", $ncfid));
  if (!$name) {
    drupal_set_message(t('The custom format could not be found.'), 'error');
    drupal_goto('admin/settings/name');
  }
  $form = array();
  $form['ncfid'] = array(
    '#type' => 'value',
    '#value' => $name['ncfid'],
  );
  $form['#name'] = $name;
  return confirm_form($form, t('Are you sure you want to delete the custom format %name ("%format")?', array(
    '%name' => $name['name'],
    '%format' => $name['format'],
  )), 'admin/settings/name', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}