You are here

function inline_entity_form_close_row_form in Inline Entity Form 7

Button #submit callback: Closes a row form in the IEF widget.

Parameters

$form: The complete parent form.

$form_state: The form state of the parent form.

See also

inline_entity_form_open_row_form().

2 string references to 'inline_entity_form_close_row_form'
inline_entity_form_entity_form in ./inline_entity_form.module
Wraps and returns the entity form provided by the passed-in controller.
inline_entity_form_remove_form in ./inline_entity_form.module
Wraps and returns the remove form provided by the passed-in controller.

File

./inline_entity_form.module, line 1399
Provides a widget for inline management (creation, modification, removal) of referenced entities. The primary use case is the parent -> children one (for example, order -> line items), where the child entities are never managed outside the…

Code

function inline_entity_form_close_row_form($form, &$form_state) {
  $element = inline_entity_form_get_element($form, $form_state);
  $ief_id = $element['#ief_id'];
  $delta = $form_state['triggering_element']['#ief_row_delta'];
  $form_state['rebuild'] = TRUE;
  $form_state['inline_entity_form'][$ief_id]['entities'][$delta]['form'] = NULL;
}