You are here

function fape_field_edit_field_form_submit in Field API Pane Editor (FAPE) 7

Submit field editing form

1 string reference to 'fape_field_edit_field_form_submit'
fape_field_edit_field_form in ./fape.module
Subform to edit a field instance.

File

./fape.module, line 283
Adds direct field editing via contextual links.

Code

function fape_field_edit_field_form_submit($form, &$form_state) {
  $entity_type = $form_state['entity_type'];
  $entity = $form_state['entity'];
  $field_name = $form_state['field_name'];
  $field_instance = $form_state['field_instance'];
  $langcode = $form_state['langcode'];

  // Extract field values from submitted values.
  ctools_field_invoke_field_default($field_instance, 'extract_form_values', $entity_type, $entity, $form, $form_state);
  ctools_field_invoke_field_default($field_instance, 'submit', $entity_type, $entity, $form, $form_state);

  // Let other modules act on submitting the entity.
  // Avoid module_invoke_all() to let $form_state be taken by reference.
  foreach (module_implements('field_attach_submit') as $module) {
    $function = $module . '_field_attach_submit';
    $function($entity_type, $entity, $form, $form_state);
  }
}