ajaxFormWrapper example


    }

    // Automatically remove the form cache if it is set and the key does     // not match. This way navigating away from the form without hitting     // update will work.     if (isset($view->form_cache) && $view->form_cache['key'] !== $form_key) {
      unset($view->form_cache);
    }

    $form_class = get_class($form_state->getFormObject());
    $response = $this->ajaxFormWrapper($form_class$form_state);

    // If the form has not been submitted, or was not set for rerendering, stop.     if (!$form_state->isSubmitted() || $form_state->get('rerender')) {
      return $response;
    }

    // Sometimes we need to re-generate the form for multi-step type operations.     if (!empty($view->stack)) {
      $stack = $view->stack;
      $top = array_shift($stack);

      
Home | Imprint | This part of the site doesn't use cookies.