Forum Discussion

AlfiAtmojo-b069's avatar
AlfiAtmojo-b069
Community Member
5 years ago

Problem on Crossword in storyline360

Hi guys,

Need help you, I create crossword in my storyline360, but the text entry field can still be filled with more than one character, how do you make one text entry field for one character only?

Thanks all.

2 Replies

  • Hi Alfi, this isn't possible using Storyline alone, but can be done with a little bit of JavaScript. I've attached an example for you.

    This is the code I have added. It simply looks for all input fields on the slide and then applies a (standard) attribute to the input field which will restrict the string length to one character.

    The only thing you have to be careful of is that the <input> field can turn in to a <textarea> if you make it larger (I think over two lines in height) and the JavaScript will no longer work. I assume though, if writing a crossword, your input fields will be small boxes as I demonstrate in the Storyline file I've uploaded.

    var $inputs = document.querySelectorAll('input[type=text]');
    $inputs.forEach(function(obj, ix){
    obj.setAttribute("maxlength",1);
    });
  • RickMaranta's avatar
    RickMaranta
    Community Member
    It's maddening that Articulate doesn't give basic ways to do this after all these years. It should have some basic built-in controls for this. But thanks for the JavaScript code.