In this drupal api example: https://api.drupal.org/api/examples/ajax_example%21src%21Form%21DynamicFormSections.php/class/DynamicFormSections/8.x-1.x

Why $form_state->getValue('question_type_select') is by default empty inside the submitForm() function (line 180) so that we need to add a $form_state->setValue('question_type_select', $form_state->getUserInput()['question_type_select']); ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.