How to add an anchor to quiz submit/skip/back url

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
lenkaen's picture

I am new to drupal as a developer. I am using drupal 7 and the quiz module. I would like to add to the URL for when a user is taking a multiple choice quiz and clicks one of the buttons back/submit/quiz, so that the quiz page is shown from the anchor #quiz-progress or similar.

I've been trying to figure out the $form array and been looking in the functions
sl_quiz_form_quiz_question_answering_form_alter and _sl_quiz_question_answering_form_submit
in sl_quiz_module, but I haven't figured it out yet.

Any help would be appreciated.

Comments

Partial success

lenkaen's picture

I have managed to do this now by adding a

$form['#action'] = url($url, array('fragment' => 'anchor'));

Is there any chance I could hide this from the URL itself though?

EDIT: nevermind. I don't think I need to or want to.

Quiz

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week