Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When i open the quiz in multiple choice answer and i jump into the last question i get this error
Notice: Undefined index: #type in ajax_quiz_form_alter() (line 51 of /Applications/XAMPP/xamppfiles/htdocs/quiz7/sites/all/modules/quiz/modules/ajax_quiz/ajax_quiz.module
and this is the code line 51 which get error
if ($form['navigation'][$nav_child]['#type'] == 'submit') {
$form['navigation'][$nav_child]['#ajax'] = $ajax;
}
how to solve it?
thanks
Comment | File | Size | Author |
---|---|---|---|
#3 | quiz-3045702-3.patch | 684 bytes | daiwik.addweb |
|
Comments
Comment #2
imunklovarian CreditAttribution: imunklovarian commentedComment #3
daiwik.addweb CreditAttribution: daiwik.addweb at AddWeb Solution Pvt. Ltd. commented@imunklovarian, Here's the patch for the same, In the log I get this error & to resolve the error I've added isset condition.
Hope this will helps!
Thanks
Comment #4
djdevinThanks, this works and fixes the notice on the last page because there is another non-submit element on the page (markup text).