function registration_field_formatter_settings_form_process in Entity Registration 8
Same name and namespace in other branches
- 8.2 includes/registration.field.inc \registration_field_formatter_settings_form_process()
- 7.2 includes/registration.field.inc \registration_field_formatter_settings_form_process()
- 7 includes/registration.field.inc \registration_field_formatter_settings_form_process()
Form element process handler for registration_field_formatter_settings_form().
File
- includes/
registration.field.inc, line 170 - 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;
}