function multiform_test1_callback in Multiple forms 7.2
Callback for Test 1
1 string reference to 'multiform_test1_callback'
- multiform_test_menu in tests/
multiform_test.module - Implementation of hook_menu().
File
- tests/
multiform_test.module, line 42 - @author Kálmán Hosszu - http://drupal.org/user/267481
Code
function multiform_test1_callback() {
$settings = array(
'#multiform_id' => 'multiform_test1',
'#subforms' => array(
array(
'form_id' => 'multiform_test1_1',
'#map' => array(
0 => array(
'#parents' => array(
'submit',
),
'#triggering_submit' => array(
'save',
),
),
1 => array(
'#parents' => array(
'delete',
),
'#triggering_submit' => array(
'delete',
),
),
),
),
array(
'form_id' => 'multiform_test1_2',
'#map' => array(
0 => array(
'#parents' => array(
'submit',
),
'#triggering_submit' => array(
'save',
),
),
1 => array(
'#parents' => array(
'delete',
),
'#triggering_submit' => array(
'delete',
),
),
),
),
),
'#submit_map' => array(
'#submits' => array(
'save' => array(
'#type' => 'submit',
'#value' => 'save',
),
'delete' => array(
'#type' => 'submit',
'#value' => 'delete',
),
),
),
'#redirect_path' => 'multiform-test/1',
);
return multiform_get_form($settings);
}