node_form_submit_build_node

Versions
6 – 7
node_form_submit_build_node($form, &$form_state)

Build a node by processing submitted form values and prepare for a form rebuild.

▾ 3 functions call node_form_submit_build_node()

node_form_build_preview in modules/node/node.pages.inc
node_form_submit in modules/node/node.pages.inc
poll_more_choices_submit in modules/poll/poll.module
Submit handler to add more choices to a poll form. This handler is used when javascript is not available. It makes changes to the form state and the entire form is rebuilt during the page reload.

Code

modules/node/node.pages.inc, line 450

<?php
function node_form_submit_build_node($form, &$form_state) {
  // Unset any button-level handlers, execute all the form-level submit
  // functions to process the form values into an updated node.
  unset($form_state['submit_handlers']);
  form_execute_handlers('submit', $form, $form_state);
  $node = node_submit((object)$form_state['values']);

  field_attach_submit('node', $node, $form, $form_state);

  $form_state['node'] = (array)$node;
  $form_state['rebuild'] = TRUE;
  return $node;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.