Skip to main content
johnm70234282
Participant
January 3, 2018
Answered

On Quiz Slides, Show a Shape When the Submit Button is Clicked

  • January 3, 2018
  • 2 replies
  • 531 views

On quiz slides, we want to initially show only the Submit button. On clicking submit, a shape should appear that looks like a "Next" button, along with the built-in response message. This is to take advantage of the built-in functionality of click anywhere for the next slide. This is to make the user experience consistent throughout (click Next to advance). So clicking the Next button would be the same as clicking anywhere.

I have added the shape for the Next button, which is hidden on starting the slide. Also created an advanced action to show the shape when triggered by either On  Success or Last Attempt, and then continue. Logic tells me this should work. But it does not: the Next button shape does not appear when Submit is clicked (the response message does appear). The Next button shape does however appear briefly before going to the next slide on clicking anywhere on the slide.

How can I make the Next button shape appear along with the response message when Submit is clicked?

This topic has been closed for replies.
Correct answer Jeremy Shimmerman

Here is a workaround that might help.  Deselect the 'correct' captions and create your own hidden correct message, similar to what you have already done for your next button.  Give the caption the ID 'cMsg' and the next button the ID 'nextBtn'. 

On your submit button click execute javascript on success. Make sure you deselect 'Continue Playing the Project'

Put in the following script:

cp.show('nextBtn')

cp.show('cMsg')

function myFunction(){

window.cpAPIInterface.next();

window.removeEventListener("click", myFunction);

}

window.addEventListener("click", myFunction);

 

Let me know if this is what you had in mind.  

2 replies

Jeremy Shimmerman
Jeremy ShimmermanCorrect answer
Participating Frequently
January 4, 2018

Here is a workaround that might help.  Deselect the 'correct' captions and create your own hidden correct message, similar to what you have already done for your next button.  Give the caption the ID 'cMsg' and the next button the ID 'nextBtn'. 

On your submit button click execute javascript on success. Make sure you deselect 'Continue Playing the Project'

Put in the following script:

cp.show('nextBtn')

cp.show('cMsg')

function myFunction(){

window.cpAPIInterface.next();

window.removeEventListener("click", myFunction);

}

window.addEventListener("click", myFunction);

 

Let me know if this is what you had in mind.  

johnm70234282
Participant
January 4, 2018

Jeremy,

Wow! That is slick. Wish I had a better understanding of JavaScript. I was however able to hack it enough to make it work for the incorrect message as well.

If I may impose further: Although the "must answer" error message displays if Submit is clicked without selecting an answer, an answer must be double-clicked (or a click must be made somewhere before clicking an answer), which could be very confusing for a learner and create what seems to be endless loop.

How can this be set up so that when the "must answer" error displays a single click on an answer moves things forward?

Jeremy Shimmerman
Participating Frequently
January 4, 2018

I haven't really tested this out too much and it might be more trouble then it's worth.  You could add this script to each of your quiz pages. Essentially you will be able to 'pass through' the incomplete comment 'wall' that captivate puts in front of the window.  

document.onmousemove  = function(){

$('#feedbackClickDiv').css( 'pointer-events', 'none' );

};

Your learners will only have to click once but the message will stay up until they move to the next slide. I'm sure there are other ways of doing it but it would probably require messing around with cpm.js file after publication.  

Lilybiri
Legend
January 3, 2018

Submitting has two steps:

  1. Click on Submit will show the feedback messages, including the mention 'Click on the ...' but will NOT trigger the actions Succes or Last Attempt. The playhead remains paused.
  2. The user clicks on the slide or presses Y then the playhead is released and the actions are executed.

If you understand that workf low, you see that your setup will not be successful.

To make thsi happen (explained it quite a while ago, no time to update in Question Question Slides in Captivate - Captivate blog ) you need more wokr. You have to skip the first step, which means deleting the default feedback messages. You have to create custom feedback messages, which are hidden oiriginally in output. You can also have a Next shape button (needs to be a button) with a pausing point later than the pausing point of the quiz slide (default is 1,5secs, but maybe you have changed it). Now the actions On Success and Last Attempt will be done when the Submit button is clicked. Those actions will now have to show the appropriate feedback message, and the Next button. The slide will remain paused by the Pausing point of the Next button.

johnm70234282
Participant
January 3, 2018

Lilybiri,

The quick response is appreciated. I am trying to follow your instructions; however, Captivate 2017 does not let me add a button to a quiz slide, at least not when I select "Interactions" from the toolbar at the top of the screen. The command for Button is grayed out. I have also tried to copy and paste a button from a non-quiz slide to no avail.

Lilybiri
Legend
January 3, 2018

Sorry, thought you knew that the only interactive object that can be added to quiz slides is the shape button?  I hae been blogging so much about shape buttons, and presenting webinars that I find it so strange that after 5 -6 years users still ignore them. Have a look at this post. I clearly mentioned in my first asnwer 'shape button'

Buttons on Question/Score Slides in Captivate 6? - Captivate blog