Taking up space

Oct 27, 2014

In a text entry interaction, I want one of the acceptable answers to be a space.  I've entered a space, but when the slide plays the space isn't recognized as correct.

Is a space an acceptable answer, and if so, how is that indicated?

Thanks!

5 Replies
Steve Flowers

Looks as if the evaluation for the question doesn't recognize a single space. There is a way to evaluate for a space but you'd need to use a custom interaction and some JavaScript to get it done.

(space) isn't picked up by condition evaluation. However, a space sandwich is: ~(space)~

So by adding a variable - I added one called converted - you can send the field variable out to have "bread" added and pushed back in for evaluation. Here's a bit of JavaScript that would do that:

var player=GetPlayer();
var entry=player.GetVar("TextEntry");
player.SetVar("converted","~"+entry+"~");

On your processing button, execute the javascript trigger then, using your translated variable, evaluate for your sandwich (~ ~, ~your answer~).

See attachment for an example.

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