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.
I am attempting to disable the spell check on the answer field for Short Answer quizzes but I am unable to.
I attempted to create a hook_alter_forum using the form id "quiz_question_answering_form" (found out when inspecting element while taking the quiz) and "answer" as the machine name for the field.
Is that incorrect?
What steps should be taken to properly complete this?
I attempted the solutions that were suggested to me when I asked for help on the Drupal Stack Exchange
http://drupal.stackexchange.com/questions/217152/how-to-add-attributes-t...
Comments
Comment #2
andrewmriv CreditAttribution: andrewmriv commentedComment #3
djdevinNo, that's correct. Using hook_form_alter, you can modify the question's answer form elements.
The question's answer form would be stored in $form['question'][$question_id]['answer']
$form['question'] is an array of all the questions if you are showing a page of questions.
Comment #4
djdevin