You are here

function subform_get_state in Subform 7

Returns a reference on a subform's state.

Parameters

$subform_name: Unique identifier of the requested subform ($subform_element['#name']).

$form_state: A keyed array containing the current state of the parent form.

Return value

A reference to the state of requested subform or FALSE if non-existant.

6 calls to subform_get_state()
subform_batch_execute_subform_submit_handler in ./subform.module
Batch operation that executes a submit handler for a subform.
subform_element_process in ./subform.module
Processes a subform element.
subform_element_rebuild in ./subform.module
Constructs a new $subform from the information in $subform_state.
subform_element_submit in ./subform.module
Submit handler for submitting a single subform.
subform_element_validate in ./subform.module
Validation handler for the subform element.

... See full list

File

./subform.module, line 717
Defines a subform element type.

Code

function &subform_get_state($subform_name, &$form_state) {
  if (!isset($form_state['temporary']['subform'][$subform_name])) {
    $return = FALSE;
    return $return;
  }
  return $form_state['temporary']['subform'][$subform_name];
}