Forum Discussion
WayneKneussle
6 years agoCommunity Member
Text Entry Box issue when user includes a blank space
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 ...
PaulStevens-1ec
6 years agoCommunity Member
Hi
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, '');
p.SetVar("TextEntry",newTextentry);
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?
Related Content
- 10 months ago
- 4 months ago
- 5 months ago
- 2 months ago