Commit cb1c3cbe authored by rudiedirkx's avatar rudiedirkx Committed by Ra Mänd
Browse files

Issue #2612520 by rudiedirkx, SpadXIII: Alter form state just before widget logic runs

parent 0c42ac18
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -504,6 +504,8 @@ function inline_entity_form_field_widget_form(&$form, &$form_state, $field, $ins
  $entity_count = count($form_state['inline_entity_form'][$ief_id]['entities']);
  $cardinality_reached = ($cardinality > 0 && $entity_count == $cardinality);

  drupal_alter('inline_entity_form_widget_state', $form_state['inline_entity_form'][$ief_id], $form_state);

  // Build the appropriate widget.
  // The "Single value" widget assumes it is operating on a required single
  // value reference field with 1 allowed bundle.