multipage_form_example_custom_submit

  1. drupal
    1. 4.7
    2. 5
Versions
4.7 – 5 multipage_form_example_custom_submit()

Code

developer/examples/multipage_form_example.module, line 286

<?php
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);
}
?>