Forum Discussion
Prevent enter key from submitting text entry for evaluation
Hi,
I am having a problem with the text entry. I would like the learner to be able to type a longer text into the text entry box. When he presses 'enter', a line break should be created within the text entry box. However, as soon as the learner presses the enter key, the text is automatically submitted and the learner is moved on to the next slide. Is there a way around this? I deleted the 'next' and 'submit' button and created my own submit button, but this didn't work either. Can anybody help? Thank you.
Sabine
- JustinLovett-75Community Member
I am still in disbelief that this feature wasn't corrected for yet. Come on guys.
Hi Kim!
Wow! That's a pretty deep reflection. There is not an out-of-the-box way to set something like that up, so I will leave that to the community to assist in your design.
- KimHofmann-9ba8Community Member
Thanks!
-Kim
- AnnemarieReb048Community Member
Hi Ren,
I have tried making the text entry bigger, but that doesn't work. Enter still submits the question! I hope I solution can be found.
- LisaJones-20cfaCommunity Member
To whomever still needs this functionality, I did find a workaround. Essay didn't work for me because we needed people to be able to see and print, if desired, what they entered and what the suggested responses are with the Review Result option. We hope people don't use the enter key, but we can't control what users decide to do.
I will say, it is a little annoying that we have options for how to submit in the quiz form - which is to use a button and (or at least it seem so) to submit with a keystroke. One would assume if that is blank, that a keystroke would be ignored.
That said, here's how I got this to work (you may need to modify it a bit based on your needs):
Note: I used a custom Submit button in the page, but this should work with the player submit button.
I did have some extra stuff to suppress the Next button and show the custom submit button until the slide was answered (so on review they can use the Next button) - so this shouldn't change anything - I just mention it in case...
Question type: Fill in the blank (I had a longer entry box)
Question properties: Feedback "By Question", Attempts Unlimited
Setup:
Create variable FIXEnterPressed (True/False)
Add a trigger - change FIXEnterPressed to FALSE when the timeline starts
On the Submit button (on click), add the triggers to adjust FIXEnterPressed to TRUE and then Submit interaction (order is important)
Delete the Correct and Incorrect feedback layers. Make the Try again layer blank (change the master and delete any 'artifacts' that may remain), set the timeline to the shortest time (we really only want it open for a very short time, just to run a trigger)
Adjust Try Again layer properties to: Hide other slide layers (or not, really shouldn't matter), Hide slide layer when timeline finishes, revisiting: Initial State, (others are deselected)
Add a trigger in Try again layer to jump to next slide when timeline starts if (condition) FIXEnterPressed is equal to True
---
So essentially what we're doing here is passing a variable to check when Submit is pressed vs when someone presses Enter. We have to hack it by using the Try Again layer, otherwise the question submits before anything else, so we can't really hijack the logic.
Ideally and hopefully the question properties will be updated so they comply with our wishes (i.e. if we want either ENTER key OR some sort of Submit button OR ENTER key AND submit button to submit the interaction) - but until then, hopefully this will help someone.
Best--L - RebeccaFleischCCommunity Member
Hi Sabine,
Is this on a question slide or a regular content slide?
This support page may help to answer your question, but briefly, for these data entry questions, pressing enter is = pressing Submit answer
- Graded: Fill in the Blank
- Graded: Numeric
- Survey: Short Answer
- Survey: How Many
- Freeform: Text Entry
If you use an Essay Question, Learers CAN use ENTER for a line break.
And if you're using just a data entry field on a content slide, making the text entry box taller should allow Learners to press ENTER for a line break.
Also, if your Learners are moving to the next slide automatically, check the slide properties. If the slide is advancing automatically, you can change it to By User.
- Sabinede-Kamps1Community Member
It was a question slide. I now added a large text entry box to a content slide instead and it works.Thank you very much Rebecca.
- RebeccaFleischCCommunity Member
Very cool, Sabine!
- AbhishekDasg489Community Member
Hi,
I am having the same issue as well. We have added a pretty large text entry box in the question slide for the user to input their answers. I also created custom submit button for submitting the answers. However, whenever the user presses Enter key in the text entry box, instead of adding a new paragraph, its taking to the next slide. We have already selected Slide Progresses by user.
Any help will be much appreciated.
Thanks,
Abhishek
Hi Abhishek! Did you check out Rebecca's response above? What type of question are you utilizing?
- AbhishekDasg489Community Member
Hi,
I did check her response. Unfortunately, its not working. We have tried increasing the size of the text box as well. However, as soon as the Enter key is pressed it takes to the next slide.
We are using freeform question. We want the user to enter multiple paragraphs in it which needs to be graded. Otherwise we could have used the survey type question which allows us to enter essay and allows the enter key to insert a new paragraph.
I have also tried using a variable to capture the text entered and if there is no value entered in the text entry it can open up a new layer which acts as a pop up saying invalid answer. However, the challenge I am facing is when there is already a sentence or paragraph entered and then the user presses the enter key to get a new paragraph. Can we somehow customize that as well?
Thanks,
Abhishek
The free form text entry treats the enter key as submit as you can see here. Would you be able to provide a sample file of your .story project for us to take a look at?