Forum Discussion
Submit button Override
Has anyone had this problem and found a solution? I am working in a course that was created a couple of years ago by someone else. I added a slide that was a multiple answer question. The slide keeps showing some sort of default for the feedback for an Invalid Response. Finally, I got to where it will show the information I want, but it superimposes the default over top. I have looked in the Master Feedback slides and I have checked for an unknow trigger. I don't know where this is coming from. I also don't know what other options there are for controlling what happens when the SUBMIT button is clicked. Correct, Incorrect, and Try Again work just fine and use the master feedback I selected. Any thoughts? I have included a picture.
6 Replies
- JudyNolletSuper Hero
By default, the built-in "Invalid Answer" message shows when the Submit button is clicked before any of the designated responses are Selected. Storyline doesn't provide a way to turn that off.
However, you can override it by adding conditions to the "Submit__" trigger. Have the trigger run with the conditions that any of the responses = Selected. Include an Else statement that shows your custom "Invalid Response" layer.
- TuwannaSycamoreCommunity Member
Thank you for the response. So, the current trigger I have for the SUBMIT button is this:
Show layer INVALID RESPONSE
When the user clicks submit
If the state of Check box 1 = Normal
and the state of Check box 2 = Normal
and the state of Check box 3 = Normal
and the state of Check box 4 = NormalIs this what you are referring too? It still displays the default over top of the chosen layer. Please let me know if there is a different way. I am eager to learn, and to fix this. Thank you.
- JudyNolletSuper Hero
TuwannaSycamore: To override the default "Invalid Answer" message, you have to prevent the program from submitting the question for scoring if the user hasn't clicked any of the responses.
Thus, the trigger would be something like this:
Submit [interaction] when the user clicks Submit
If the state of Check box 1 = Selected
or the state of Check box 2 = Selected
or the state of Check box 3 = Selected
or the state of Check box 4 = SelectedElse show layer Invalid Response
With that trigger, if any response is Selected, the program will perform the Submit [interaction], and it will show the appropriate feedback layer.
If none of the responses is Selected (that is, none of the conditions are met), the program won't perform the Submit [interaction] action. Instead, it will show your custom Invalid Response layer.
- TuwannaSycamoreCommunity Member
JudyNollet Thank you so much for the clarification. I give it. I will give it a try. 😁😁
As an update: This worked! Thank you bunches!!
- NedimCommunity Member
This little JavaScript snippet disables the default “Invalid Answer” prompt, allowing you to display your own custom layer:
const style = document.createElement('style'); style.textContent = ` #message-prompt-wrapper { display: none !important; } .overlay.overlay-message { display: none !important; } `; document.head.appendChild(style);
Place this script in an Execute JavaScript trigger that runs when the timeline starts on your question slide. Follow it with two additional triggers (in the correct order, as sequence matters). This approach works for all types of interactions. I've also included a sample .story file for reference.
- TuwannaSycamoreCommunity Member
Thank you for this advice and assistance. I look forward to trying this out. It will certainly give me more options for controlling what happens in the course.
Related Content
- 6 months ago
- 2 years ago
- 9 months ago