You are here

function registration_field_formatter_settings_form_process in Entity Registration 7

Same name and namespace in other branches
  1. 8.2 includes/registration.field.inc \registration_field_formatter_settings_form_process()
  2. 8 includes/registration.field.inc \registration_field_formatter_settings_form_process()
  3. 7.2 includes/registration.field.inc \registration_field_formatter_settings_form_process()

Form element process handler for registration_field_formatter_settings_form().

1 string reference to 'registration_field_formatter_settings_form_process'
registration_field_formatter_settings_form in includes/registration.field.inc
Implements hook_field_formatter_settings_form().

File

includes/registration.field.inc, line 216
Field hooks.

Code

function registration_field_formatter_settings_form_process($element, &$form_state, &$form) {

  // For reasons I don't fully understand, when you click the gear button to
  // open the settings, $form_state['submitted'] === TRUE; but after you set the
  // settings and click the 'Update' button, $form_state['submitted'] === FALSE.
  // Furthermore, it's impossible to add a submit handler to this sub-form or
  // the 'Manage Display' form as a whole.
  //
  // Anyway, to avoid blowing away the string translation if the user just
  // wants to look at the string without changing it.
  if ($form_state['submitted'] === FALSE) {
    _registration_translate_update($element['i18n_string_key']['#value'] . ':label', $element['label']['#default_value']);
  }
  return $element;
}