You are here

function multiform_test2_callback in Multiple forms 7.2

Callback for Test 2

1 string reference to 'multiform_test2_callback'
multiform_test_menu in tests/multiform_test.module
Implementation of hook_menu().

File

tests/multiform_test.module, line 93
@author Kálmán Hosszu - http://drupal.org/user/267481

Code

function multiform_test2_callback() {
  $settings = array(
    '#multiform_id' => 'multiform_test2',
    '#subforms' => array(
      array(
        'form_id' => 'multiform_test2_1',
        '#map' => array(
          0 => array(
            '#parents' => array(
              'submit',
            ),
            '#triggering_submit' => array(
              'save',
            ),
          ),
        ),
      ),
      array(
        'form_id' => 'multiform_test2_2',
        '#map' => array(
          0 => array(
            '#parents' => array(
              'submit',
            ),
            '#triggering_submit' => array(
              'save',
            ),
          ),
        ),
      ),
    ),
    '#submit_map' => array(
      '#submits' => array(
        'save' => array(
          '#type' => 'submit',
          '#value' => 'save',
        ),
      ),
    ),
    '#redirect_path' => 'multiform-test/2',
  );
  return multiform_get_form($settings);
}