You are here

function _msnf_form_step_get_current in Multistep Nodeform 6

Same name and namespace in other branches
  1. 7 msnf.module \_msnf_form_step_get_current()

Returns the current form step from $form_state.

4 calls to _msnf_form_step_get_current()
_msnf_form_add_buttons in ./msnf.module
Adds buttons to the form depending on the current step.
_msnf_form_submit in ./msnf.module
Custom submit handler for node form.
_msnf_hide_fields in ./msnf.module
Hide all fields that are not associated to the current step.
_msnf_step_add_information in ./msnf.module
Function to add step title and description to the node form.

File

./msnf.module, line 581
Main functions for module "Multistep Nodeform".

Code

function _msnf_form_step_get_current($form_state) {
  if (!isset($form_state['storage'])) {
    return 1;
  }
  if (isset($form_state['storage']['step'])) {
    return $form_state['storage']['step'];
  }
  return 1;
}