The following workarounds did help in our case (Drupal 10.5.1, Webform 6.2.9, Webform Quiz 8.x-2.1):
Problem: In webform_quiz.module->webform_quiz_form_alter() the library is not loaded, because $form['#entity_type'] is not present.
Workaround: Add the following hook to your custom module:/** * Attach the library webform_quiz/webform-quiz if needed */ function YOURMODULE_form_alter(&$form, FormStateInterface $form_state, $form_id) { // // ATM it seems not possible to specifically identify Webform *Quiz* forms if (!empty($form['#theme']) && $form['#theme'][0] == 'webform_submission_form') { $form['#attached']['library'][] = 'webform_quiz/webform-quiz'; } }
Problem: In connection with the upgrade to D10 a jQuery dependency was removed ( https://www.drupal.org/node/3158256 → ).
The JavaScript \js\webform-quiz.js hat not yet been adapted accordingly.
Workaround: Apply the 2 following patches: