Forum Discussion
Prevent enter key from submitting text entry for evaluation
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