Why no placeholder text input on HTML5?
Feb 21, 2014
We are working with the HTML5 publish from Storyline. We have some typing/input activities. We would like to have the input fields show a placeholder/default value like, "How did you feel about..." or some such things like that.
Now the feature list here (http://www.articulate.com/support/storyline/comparing-storylines-flash-html5-and-articulate-mobile-player-output) says "Custom instruction text won't display in data entry fields in HTML5." And sure enough we don't see the custom text in html5 published versions.
OK so here is the question!
Since the html5 standard specifies the placeholder attribute, why doesn't this work in html5?
The placeholder attribute seems exactly like what we want and what custom instruction text is. Right? Here is a site showing the input placeholder attribute in action.
http://davidwalsh.name/demo/html5-placeholder.php
And it looks like the placeholder attribute is well supported across browsers.
http://caniuse.com/#feat=input-placeholder
So why the irony that something that html5 does out of the box isn't included in html5 publish?
14 Replies
Anybody?
Hi R,
I don't claim to know why our development team did or did not include a particular feature, as I'm also not a programmer to understand the intricacies behind it. If it's something you'd like to see in future versions or updates to Storyline I'd suggest that you share your thoughts (being as detailed as this thread) in the form of a feature request as those go directly to our product development team for review and for them to determine the possibility of which features to include in new updates.
Hi,
Just wondering if anything came of this? I've been trying to remove the default placeholder text in HTML5 output to no avail.
Edit:
For those wondering how to do it, I had to use js.
If you look at the output, the textarea is inside a div with the class textinput and interactive. Using that information it's dead easy to edit the placeholder text to whatever you want. Obviously this doesn't work in flash, but if you're wanting a blank input box then you can't go wrong.
Execute this javascript when the timeline begins on that slide.
$('.textinput.interactive textarea').attr("placeholder","");
Hi Gary
Your solution was exactly what I needed, but it would only work for me in basic test slides, not my project.
It took several hours of testing to understand what was going on.
Any textarea less than 80 pixels in height with default margins, or 70 pixels in height with no margins was completely unaffected by your javascript line. I theorized that storyline is only creating the 'textarea' for oversize entry areas, and creating something else for smaller ones.
After much testing I discovered that this smaller text entry field seems to be called 'input' so I now have the following javascript at the start of my slides, to set HTML5 placeholder text.
$('.textinput.interactive textarea').attr("placeholder","my placeholder here");
$('.textinput.interactive input').attr("placeholder","my placeholder here");
Now placeholder text in HTML5 works perfectly for me, regardless of the text entry field height.
This works very well. Thanks! Any ideas for how to make the field blank AND focused (active)?
Hi Jeremy,
This thread is a bit older - so I'm not certain that folks are still subscribed. You may want to message them directly using the "contact me" button on their profile to see if they have additional thoughts on how to set this up as you need. Within Storyline you can place a text entry item as the top most object on the timeline and that will bring it to the front, and should force the focus there.
Thanks for the advise. Unfortunately, the rule of bringing the text entry item to the top of the timeline does not seem to apply for HTML5. I will try to contact these folks directly. Thanks.
Hi Jeremy,
Certainly - and I'll keep you posted if I find out anything else in relation to the focus of text entry and HTML5.
Small update I'd like to share, using the code below on a javascript trigger on timeline starts, sets the focus in html5 to the text entry box.
$('.textinput.interactive input').focus();
Nice one Marcus - thanks for sharing that here. I wonder if it would work in the Flash as well even if you didn't place the text entry box at the bottom of the timeline?
Hi all
just wondering if there has been any update with regard to this issue?
I tried the trigger suggested by Marcus but, unfortunately, I still get the same result.
Thanks
Hi Íde,
Thanks for reaching out! I created a quick sample file using an essay question type and a data entry box, and both options have placeholder text in HTML5. Let me know if you're not seeing that on your end!
Also, you'll want to be sure you're on the most recent update of your version of Storyline. :)
I'm just wondering if you are using Storyline 3? As we've just found this trigger doesn't work now, but placing the text entry at the bottom of the timeline does make it get the focus in html5.
This post was removed by the author
Good news, Marcus! I'm excited to let you know that we just released update 3 for Storyline 3! It includes new features and fixes - check them all out here.
One of the fixes addresses an issue where data-entry fields didn't have focus when slides loaded in HTML5 output, so learners had to click inside them before entering text.
Here’s where you can download and install the latest version of Storyline 3. Let me know how you make out!
This discussion is closed. You can start a new discussion or contact Articulate Support.