Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
The place for more technical questions for those who want to create new pagetypes or bespoke functionality.
  • Page:
  • 1

TOPIC:

Enable/Disable navigations buttons 9 years 4 months ago #2902

  • Viguera
  • Viguera's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
Hi,

I would like to add a mcq page (multiquestion) but i want the 'next button' to be disable until the correct answer is selected. I can disable the button with the editor, but how i enable by code the button again? what's the correct js code to do this?

Thanks a lot!!

Please Inloggen or Create an account to join the conversation.

Enable/Disable navigations buttons 8 years 5 months ago #3805

  • xlearn
  • xlearn's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 24
  • Thank you received: 3
Hi all, would really like to know if this is a possibility too? Thanks.
Lilian

Viguera wrote: Hi,

I would like to add a mcq page (multiquestion) but i want the 'next button' to be disable until the correct answer is selected. I can disable the button with the editor, but how i enable by code the button again? what's the correct js code to do this?

Thanks a lot!!

Please Inloggen or Create an account to join the conversation.

Enable/Disable navigations buttons 8 years 4 months ago #3862

  • Fay
  • Fay's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 229
  • Thank you received: 92
1. Add the optional property 'Navigation Buttons' to the MCQ page and change to 'Back only'.

2. Open the wysiwyg editor for the correct answer's feedback field. Click Source and paste in this:
<script>
  $x_nextBtn.button("enable");
</script>

The button will stay disabled until the correct answer is submitted.

Alternatively you could add a Xerte Page Link to the feedback text (via the wysiwyg editor) so users would follow the link to a page of your choice after selecting their answer

Please Inloggen or Create an account to join the conversation.

  • Page:
  • 1
Moderators: JohnSmith
Time to create page: 0.048 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search