The place for more technical questions for those who want to create new pagetypes or bespoke functionality.

Enable/Disable navigations buttons

  • Viguera
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 2 weeks ago #2902 by Viguera
Enable/Disable navigations buttons was created by Viguera
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 Log in or Create an account to join the conversation.

More
10 years 1 month ago #3805 by xlearn
Replied by xlearn on topic Enable/Disable navigations buttons
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 Log in or Create an account to join the conversation.

More
10 years 4 weeks ago #3862 by Fay
Replied by Fay on topic Enable/Disable navigations buttons
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:
Code:
<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 Log in or Create an account to join the conversation.

Moderators: JohnSmith
Time to create page: 0.190 seconds
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo