Character Limits in Input Entry Box

Jan 23, 2020

Hi,

I know there are no character limits can be set in the input entry boxes. However, we have added a javascript in the storyline to limit the character in the input entry boxes and till now its working but with the latest update of storyline(v3.36.21213.0)  we found that those javascripts now doesnt work and we are unable to set the character limits in our courses. Below are the javascript code we are currently adding in our slide, also i am attaching the sample storyline file for there reference.

var fields = ["BA_Num1"];
(function setMaxChars(fields) {
fields.forEach(function (field, field_index) {
$('[placeholder=' + field + ']').attr('id',field);
$("#BA_Num1").attr("maxlength","4");
$('[placeholder=' + field + ']').attr('placeholder', '');
});
})(fields);

Can anyone help me with this issue, as this is will be a huge impact to our courses.

Regards,

Arsalan

5 Replies
Zsolt Olah

The option is for you to manually add jQuery. I submitted a support ticket (maybe they change their mind). 

Basically, here are your options:

1. Most basic option is after publishing you manually edit the published files and add a line to include jQuery whatever version you need. This is a dynamic load from one of the jQuery servers.

2. If the above is a problem because of firewall or something, you can download the jQuery version you need, and then after publishing you copy it into the zip. Then you include it in the story.html and/or story_html5.html files.

3. There is another option to dynamically load jQuery without messing with the published files but it requires some upfront work (it involves adding a webobject and some JavaScript that loads the file dynamically when you launch Storyline)

Matt, do you have instructions already for these? You're probably on it. 

By the way this was the case years ago before they decided to bundle jQuery.  

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