You are here

function salesforce_api_fieldmap_delete_form in Salesforce Suite 7.2

Same name and namespace in other branches
  1. 5.2 salesforce_api/ \salesforce_api_fieldmap_delete_form()
  2. 6.2 salesforce_api/ \salesforce_api_fieldmap_delete_form()
  3. 7 salesforce_api/ \salesforce_api_fieldmap_delete_form()

Displays the confirmation form for deleting a fieldmap.

1 string reference to 'salesforce_api_fieldmap_delete_form'
salesforce_api_menu in salesforce_api/salesforce_api.module
Implements hook_menu().


salesforce_api/, line 555
Contains the admin page callbacks for the Salesforce module, including forms for general settings and fieldmap administration.


function salesforce_api_fieldmap_delete_form($form, &$form_state, $map) {
  $args = arg();

  // Return to the admin page if the fieldmap did not exist.
  if (empty($map)) {
    drupal_set_message(t('That fieldmap does not exist.'), 'error');
  $form = array();

  // Add the fieldmap to the form array.
  $form['fieldmap_index'] = array(
    '#type' => 'value',
    '#value' => $map->name,

  // Build the description text for this fieldmap.
  $desc = salesforce_api_fieldmap_description($map);
  $action = end($args);
  $text = t('Are you sure you want to @action this fieldmap?', array(
    '@action' => $action,
  $button = t('@action', array(
    '@action' => ucfirst($action),
  return confirm_form($form, $text, SALESFORCE_PATH_FIELDMAPS, $desc, $button);