Force submitting text by clicking button (disable <Enter> key)

Feb 07, 2014

I have a Freeform question slide set up and have defined my acceptable responses.

I've also designated a Submit Button which must be clicked in order to submit a response.

The Submit Keys field is blank, but when I test, I can still submit my answer by typing and hitting <Enter>.

16 Replies
Ashley Terwilliger-Pollard

Hi Adam and welcome to Heroes! 

What type of quiz question are you using? If it's a text entry question you'll want to review the information here on how the enter key will behave and the suggestions on how to modify it. 

Also, if it's not a text entry question, you may want to set up another trigger associated with the enter key - such as to show a layer reminding the user to click on the submit button to continue. 

Adam Ashton

Hi Ashley,

Thanks for the help!

I am creating a software simulation where I have an image of what the software's text entry screen looks like and have placed an invisible text entry field on top of it to mimic entering text in the software.

There's a specific phrase I want learners to input and do not want them to move on without entering that phrase and then clicking on the save button (in order to train them to always save their changes before closing the window).

I've looked at the link you included in your reply, but it seems to deal with how to get the Enter key to always act as a way to submit an answer by adding a new trigger and designating Enter as the key.

What I want is the opposite (for it to never be possible to submit an answer by hitting Enter), and I don't see how to remove the Enter key as an option because it is not listed anywhere as a trigger (it's just automatically a trigger when you create a Text Entry Interaction).

I've managed a workaround by creating a new trigger that shows the Incorrect Answer layer when the learner hits the Enter key, but is there a way to completely disable the key's functionality?

Thanks again,

Adam

Ashley Terwilliger-Pollard

Hi Adam,

If you look at the bottom of the article you'll see:

But what if the user presses the Enter key?  Here's how Storyline handles that:

  • If the data-entry field is tall enough to accommodate more than one line of text, the Enter key will add a line break (return), so the user can start a new paragraph. For example:
  • If the data-entry field is only tall enough for a single line of text, the Enter key will assign the user's response to the variable.  In other words, it will submit the user's response. For example: So depending on your set up, you may want to make the box at least one line longer so that the (first) hit of the enter key won't submit it. Although, you've got a good work around as there is no other way to completely disable it. 

As a side note, are you using the screen recording feature to make this simulation or setting up on your own? 

Adam Ashton

Hey Ashley,

What I didn't understand when I read that earlier, is that my text entry box takes most of my 800x600 window, so definitely more than one line.  But yeah, I think the workaround is doing okay.

...and I would have loved to use the screen recording feature, but I'm actually taking still captures from a videos that my client sent me of them using the software since they can't grant me access to it directly.

Have a great weekend,

Adam

Ashley Terwilliger-Pollard

Hi Leah,

Sorry for the delay - I was out of the office last week. If the text entry box is not behaving as expected using the enter key as previously described, I'd also want to know about the text box properties settings such as if you have it set to autofit or wrap the text. Also, do you have any other triggers set up to submit the information? 

Rebekah Massmann

I'm tagging onto this thread. I have the same issue/concern. I have a series of FITB questions (of varying sizes, some one line, some more). My concern is that if I hit the Enter button on the keyboard, it submits and moves to the next question, even if I haven't entered an answer (when an answer is required). I tried wrapping the text and not wrapping the text. The default setting is to shrink text on overflow, and I didn't change anything there.

The only trigger is to submit the interaction when the user clicks the submit button. I may try Adam's workaround, but considering I have about 150 slides I would need to make that edit on, it's not my favorite option. 

Ashley Terwilliger-Pollard

Hi Rebekah, 

Yes, Essay questions because they're longer/larger text boxes allow for the enter key to move to the next line instead of submitting it. If you made the box larger, to accommodate more than one line, the enter key would then move the user to the next line instead of submitting it. If you set up the enter key as part of a trigger - you could then also assign conditions to it, such as for it to only when when the TextEntry equals XYW or if it's not equal to (blank).

Rebekah Massmann

Thanks Ashley. I have tried a couple of things with the Enter key as part of a trigger to show layer. What I'm running into now is that when I close the layer and go back to the slide, the text entry box is no longer available to enter text. And yet, I can't click submit to move on, because there's no text actually in the box. Do I have a setting wrong or is this expected behavior?

Ashley Terwilliger-Pollard

Hi Rebekah,

Thanks for sharing your file, and now when I reread your other post - you did mention question types. Yes, within question types there is no other way to control the Enter key. But if you were using a data entry than you could expand the field to allow for the user to press enter and have it not submit the interaction. Since short answer responses don't allow for more than one attempt, I think thats where Storyline is getting confused in thinking that you did submit it because you pressed the enter key but then seeing there is no content there and prompting you with the invalid answer key. In testing out some additional options - I did add a trigger to your oops layer, to bring the user back to that particular slide - and then you'll see that the user is presented with the next/previous button to advance - but they still can't add any answer. 

Could you use the data entry field? And if you need to report the value of the variables, implement this method? 

Rebekah Massmann

I guess I'm getting confused between a "text entry" and then the different survey and quiz questions, because they all create text entry variables. I do need to report the value of the variables, and I am already using the method you linked to to get data on non-short answer questions (yes/no options). I just don't quite understand why we would need to create basically two text entry variables to get the one short answer result I need to get. Unless the reason is simply to work around the enter button issue.

The way everything is set up now, I'm publishing to SCORM 2004, and everything is reporting properly how I need it to, with the exception of the concern. For that reason and because I have 192 variables with branching, I really don't want to have to start over.

As I'm typing this, I'm thinking I guess I could go through and insert slides, add a text entry field (not a survey or quiz question) that adjusts a variable, and then take the existing short answer and have it set to the value of the variable? Would that work? Still. Ugh, soooo much work. 

Ashley Terwilliger-Pollard

Hi Rebekah,

Yes, I suggested it to work around the enter button issue - as the quiz question types will work that way all the time, but the text entry fields that are not associated with a question type allow for a bit more flexibility. I certainly understand not wanting to add additional variables with 192 and counting...so if you added in the text entry and used your "short answer" as is, following those directions it should work. The other option is to allow the enter key to function as normal, and maybe provide directions to users at the beginning of the course? 

This discussion is closed. You can start a new discussion or contact Articulate Support.