| 5 multipage_form_example.module | multipage_form_example_custom_submit() |
1 string reference to 'multipage_form_example_custom_submit'
File
- developer/
examples/ multipage_form_example.module, line 285
Code
function multipage_form_example_custom_submit() {
global $form_values;
foreach ($form_values as $key => $value) {
if (in_array($key, array('fav_person', 'fav_person_desc', 'fav_gummi', 'fav_color', 'fav_number', 'fav_movie', 'fav_tv'))) {
$array[$key] = $value;
}
}
// A little hack so we can save new node info properly to the variable table
if (isset($form_values['nid'])) {
$nid = $form_values['nid'];
}
else {
$nid = db_result(db_query("SELECT id FROM {sequences} WHERE name = 'node_nid'"));
}
variable_set('multipage_form_example_' . $nid, $array);
}
Login or register to post comments