Text Entry Box issue when user includes a blank space

Nov 21, 2019

Hello all, I'm having an issue with my students whereby they are in the habit of clicking on the space bar at the end of words...which is causing them to get the answers wrong.  As seen in my slide belowquestion slide

The answer is "bromine trioxide", however, it frequently occurs where my students type "bromie trioxide_" (where the underscore represents them clicking on the space bar prior to submitting the answer).  Is this a "bug" the program?  Do I have to add an additional answers with a blank spaces (this seems tedious and it would seem to me a common user error that should be ignored)?  Is there a setting somewhere?  Thanks in advance for any assistance.

12 Replies
Paul Stevens

I'm having a similar issue.

I found another thread suggesting including a Javascript trigger:

var p = GetPlayer();
var textentry = p.GetVar("TextEntry");
var newTextentry = textentry.replace(/^\s+|\s+$/g, '');

where "TextEntry" is the name of the field to have the space removed.

This does work, provided you set the javascript trigger(s) to run before any other operations after submit is clicked, but I wonder if there is a way to automate this process?


Katie Riggio

Hi, Wayne. Thanks for reaching back out!

I opened the course in Storyline 3, Update 7, and published it for LMS. (Here's the SCORM Cloud link.)

I didn't notice any issues with the space bar and submission in the HTML5 output. (Here's a short video recording of my testing.)

To help us explore further, do you run into any issues in my published output?

Wayne Kneussle

Perhaps I did a poor job explaining.  The correct answer is "bromine trioxide", however, if a student types "bromine trioxide " (notice a space after trioxide) the answer is considered incorrect upon clicking on submit.  I discovered that i can add "bromine trioxide " with a blank space after the desired answer and the activity will work as intended, however, it seems like this would be a common issue when users are typing in text.  What if a user clicks on the space bar twice before submitting?  This would once again trigger an incorrect response.  It would be helpful if the program ignored user inserted blank spaces after typed text.  Hopefully this makes sense and thanks for looking at this.

Katie Riggio

Hi, Wayne. So sorry for the confusion on my end!

I appreciate you working closely with me on this, and now understand what you're describing.

You raise great points, which I'd like to share with the right team. I opened a case with our Support Engineers regarding this behavior; they'll be in touch soon, and I'll follow along to share any relevant insight and approaches!

In the meantime, Paul's spot-on: Here's that discussion with the JavaScript solution. (Thank you, Paul, and I'll keep you in the know here as well!)

Karen Cooper

I have a slightly different question that involves a space.

Fill in the blank question: How can I represent in an Acceptable Answer that a space is required between two words? Basically I want the user to type a word, hit the spacebar, type another word and receive feedback that they are correct.

I've tried a few different things to represent the space/spacebar between two words but nothing has worked so far.

Thanks in advance for any ideas.