Forum Discussion
Enter not advancing Text Entry slide after correct text
I am not able to get my slide to advance after entering the correct text and then pressing the enter key. It does nothing. If can advance with the tab key but this is not the functionality I want to use. Where is this set? How can I get my enter key to advance my slide. I di have one in my project that does advance with Enter. I duplicated it and it did not operate the say way with the enter key. Here are the current triggers. Robit is short for Robitussin.
3 Replies
- RonPricePartner
the easiest solution may be to convert this slide to a quiz question and choose no feed back and set the Enter key as you Submit key. Then this would work without worrying about adding additional triggers
- Phil_WingfieldCommunity Member
Storyline input fields only update the variable after the field loses focus, not when something is actually typed (which can be very confusing). Tab works because it moves the user's cursor to the next object, so the field loses focus, the same way it would if you were filling out a form and pressed tab. Enter doesn't always work because it is a viable entry in a text field to start a new paragraph (you may find success adjusting the height of the box to be shorter).
Try using JavaScript to update the variable when enter is pressed by setting this script to run when the timeline begins:
const player = GetPlayer(); let input = document.querySelector('.input'); $(".input").on('keyup', function (e) { if (e.key === 'Enter') { //when enter key is pressed player.SetVar("SimulationTextVariable", input.value); //the value for SimulationTextVariable is set to update to the current input } });
- ModassarWarsiCommunity Member
Can we not ask the learners to click a button to submit their response?
Related Content
- 5 months ago
- 3 months ago