I have built a quiz using the Quiz Module in Drupal 7. However, when you click the "Start Quiz" button, which is a html form submit button, it does not send you to the first question as it does when using the Bartik theme. If you get into the quiz as an admin, the other buttons seem to function properly in bootstrap - it only seems to be the Start Quiz button that is an issue - though an important one as regular users cannot begin the quiz if they can't click this button.
I've attached two images of the form element inspected in Chrome so you can see the different mark-up produced by the two themes.
Relevant module: https://drupal.org/project/quiz
Thanks
Comment | File | Size | Author |
---|---|---|---|
bartik.png | 63.81 KB | jaydee1818 | |
bootstrap.png | 74.69 KB | jaydee1818 |
Comments
Comment #1
andregriffin CreditAttribution: andregriffin commentedPerhaps this is related? #1692198: Conflict with ajax.js
Comment #2
jaydee1818 CreditAttribution: jaydee1818 commentedPerhaps not. I tried the solution presented here: https://drupal.org/node/1692198#comment-7088706 and it did what it said on the box, changed the element from a button tag to an input tag, however the problem didn't change.
Comment #3
jaydee1818 CreditAttribution: jaydee1818 commentedI've figured out that the "type" attribute is being set to "button" in the field when the form is being output. I've fixed it by over-riding Bootstrap's bootstrap_button() function with Drupal's theme_button() code in my sub-theme's template.php file.
Comment #4
jaydee1818 CreditAttribution: jaydee1818 commentedComment #5
wundo CreditAttribution: wundo commentedJaydee, could you confirm if this is fixed on the latest release?
Comment #6
jaydee1818 CreditAttribution: jaydee1818 commentedSo I fixed this issue simply by writing my own THEME_button() function that conditionally changed this particular button back to Drupal's default button for this particular instance.
I've installed the latest version of Bootstrap, commented out my function to return it to standard Bootstrap Theme behaviour, but the problem still remains. So I've re-applied my function to ensure it works.
Perhaps it something to do with the actual Quiz module?
https://drupal.org/project/quiz
Comment #7
valkum CreditAttribution: valkum commentedI think it has something to do with drupals ajax API. But i'm not sure.
I tested with latest stable bootstrap 7.x-2.x and latest quiz version on simplytest.me. I couldn't find anything related to your issue.
Which modules from quiz did you activate?
Comment #8
jaydee1818 CreditAttribution: jaydee1818 commentedYeah weird, I just did the same thing and couldn't replicate it. It could be clashing with some other module, but I don't have the time to go back through it all. My solution works and that's good enough for me. Thanks for your help anyway.
Comment #9
markhalliwellComment #9.0
markhalliwelladded related module