function book_pick_book_nojs_submit
book_pick_book_nojs_submit($form, FormStateInterface $form_state)
Form submission handler for node_form().
This handler is run when JavaScript is disabled. It triggers the form to rebuild so that the "Parent item" options are changed to reflect the newly selected book. When JavaScript is enabled, the submit button that triggers this handler is hidden, and the "Book" dropdown directly triggers the book_form_update() Ajax callback instead.
See also
File
- core/modules/book/book.module, line 192
- Allows users to create and organize related content in an outline.
Code
function book_pick_book_nojs_submit($form, FormStateInterface $form_state) { $node = $form_state->getFormObject()->getEntity(); $node->book = $form_state->getValue('book'); $form_state->setRebuild(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!book!book.module/function/book_pick_book_nojs_submit/8.1.x