You are here

function ds_edit_preprocess_field_form in Display Suite 7.2

Same name and namespace in other branches
  1. 7 ds.fields.inc \ds_edit_preprocess_field_form()

Manage a Preprocess field.

2 string references to 'ds_edit_preprocess_field_form'
ds_ajax_add_field in modules/ds_ui/includes/ds.fields.inc
Handles ctools modal Add field
ds_ui_menu in modules/ds_ui/ds_ui.module
Implements hook_menu().

File

modules/ds_ui/includes/ds.fields.inc, line 400
Administrative functions for managing custom fields for every entity.

Code

function ds_edit_preprocess_field_form($form, &$form_state, $preprocess_field = '') {
  drupal_set_title(empty($preprocess_field) ? t('Add a preprocess field') : t('Edit preprocess field'));
  $custom_field = ds_shared_form($form, $preprocess_field);
  $form['info'] = array(
    '#markup' => t('The machine name of this field must reflect the key in the variables, e.g. "submitted". So in most cases, it is very likely you will have to manually edit the machine name as well, which can not be changed anymore after saving. Note that this field type works best on Nodes.'),
    '#weight' => -10,
  );
  $form['#validate'][] = 'ds_preprocess_field_form_validate';
  return $form;
}