Submit Numeric Entry with Enter key stroke

Jan 18, 2018

I've read and I've tested and I've read and I've tested. And my conclusions are these:

  1. For numeric entry fields, the Enter key submits the typed value if no more than one line of text, at the defined font size, can fit vertically in the field, AND the field height is no more than 60px.
  2. The oft-suggested trigger "Set <variable> equal to the typed value / When the user presses the Enter key" has no effect on numeric entry fields.

Since I am trying to make a numeric entry field with 96pt font (175px  field height) that submits it's value to the variable when the Enter key is pressed, someone tell me I'm wrong. Please.

5 Replies
Christian Herman

I'm using Storyline 360 to create a rapid simple arithmetic module aimed at kids. Bright colors, super big numbers, and an entry in the random variable Challenge to boot.

To keep things speedy, the numeric entry field for the user to type in their answer automatically has focus when the slide loads. Ideally, the user types the answer and presses the 'Enter' key on the keyboard. The key press should submit the typed value to the NumericEntry variable, but it doesn't with the 96 point font I'm using. According to this article (albeit for Storyline 1) data entry fields submit their typed values when the Enter key is pressed if there is only room for one line of text in the field. There is definitely no room for a second line of characters in the numeric entry answer field, but pressing Enter, even with a trigger created to do so, does not submit the answer if the field height is more than 60px. The auto-sized field for 96pt font is 175px in height.

The key press behavior works if I use a text entry field, but because calculations can only be done on numeric variables I have to use a numeric entry field.

I hope that makes sense.

Ashley Terwilliger-Pollard

Hi Christian,

I wasn't clear on your entire set up (specifically Javascript - as that's outside my area of support, so I did pull that part out) but I published it to Review and tested it here.  I was able to use the Enter key on the first slide to submit my answer and that showed me the incorrect layer as expected and then advanced to the next slide. So that part does appear to be working correctly? 

I know we've had at least one issue with text entry boxes larger than 60 px, but that was about how text was not wrapping or creating a scroll bar while users were entering text.

If you're seeing the enter key still not submit the answer, can you take a Peek of the problem? You can include the "Share" link here in your reply.

Christian Herman

I published just as you did and was still seeing the issue. Then I noticed a Storyline update was released today that, lo and behold, contains fixes for key-press triggers with data-entry fields. I have to wait for my IT dept to install the update, but it looks like that will fix the issue.

Thanks for your help, Ashley!

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