Prevent enter key from submitting short answer survey question

Hello, I have created a short answer slide where the user needs to enter data then click submit. Current problem is... when the user hits Enter on the keyboard the slide submits. I only want the answer to submit when the user hits the Submit button on screen. 

This interaction works as intended when previewing from SL 360, but i encounter the problem when i publish and view.

Any help or recs would be appreciated :)

8 Replies
Wendy Farmer

Which slide type are you using? So you mean, use the enter key to get to another line? 

The survey type - short answer allows 256 characters and the essay type 5000 characters see attached Peek - SL just validates the word count, the user doesn't have to hit enter/return. 

George Lake

For those of you that are still stuck here.  There is a trigger solution without remaking your slides as essay questions.  However, given that you can't isolate the "Enter" or "Submit" buttons (they are regarded as the same button in SL) - It does involve creating a custom "Submit" button.

1. Keep the standard SL Submit button, but hide it from the start

2. Create a custom Submit button.

3. Create a T/F variable to control "when" the interaction can be submitted.  Set it to "False'

SL Submit Button Trigger:
4.  Create a trigger that controls when the interaction can be submitted.
      (Submit "Text Entry Interaction" when the user clicks Submit, If "Your Var" = True).
      This basically shortcuts the "Enter" key, allowing it to perform as we want.

Custom Submit Button:
5. Set your T/F variable to "True" when the user clicks your customer SL Submit Button

6. Submit "Text Entry Interaction" when the user clicks the submit button.
   
Reminder #5-6 have to be in this order

I have included a source file for your reference.

Hopefully, this saves someone the time of converting Short answers to an essay.