Forum Discussion
- AustruyAuroreCommunity Member
Hi, since the last 360 update (3.37.21453.0), there is bad behaviour with all the text entry field (text, number).
Even when I put a shape at 100% transparency, I can click on the text entry field, even if I don't see it.
Is anyone else experiencing the same behavior?
Thanks,
- MischkaZelde754Community Member
Hi, I'm having a similar issue with covering text entry fields with a shape. I'm trying to disable text entries in a scrolling panel after the learning types a specific value. Everything works when the objects are outside of a scrolling panel, but it doesn't work when the objects are inside the scrolling panel.
I created a very simple example to show the issue. The example has two text entries in a scrolling panel, and will "hide" the text entry behind a rectangle after entering something in one of the text entries. I gave the rectangle a color to clearly show what is happening. The learner shouldn't be able to change the value in the text entry when the rectangle covers the text entry, but unfortunately, they still can.
You can access the example here: https://articulateusercontent.com/review/items/9w6dGN20qrRu6ucs/story.html
I also attached the .story file to this post.
While covering the text entry with a shape should work, I do think it would be nice to be able to disable a text entry in a different way. Hiding a text entry behind a shape is a workaround, but far from ideal, because it will still be possible to use the Tab key to select the object. I can remove the text entry from the tab order, but that would make it impossible to make a form in a software simulation that actually functions like a form (using tab to jump between text entries).
- JosephBaiocc082Community Member
I've been seeing questions over 6 years old asking about how to hide a text entry box. In what release will that functionality be included?
Just asking because I'm creating a cryptogram puzzle and covering and uncovering text entry boxes is tedious work that could be solved with a hidden/normal state.
- WendyFarmerSuper Hero
Hi Andrew
you could place a transparent (a shape with a fill set to 100% transparency NOT a shape set to NO FILL) shape over the field that is initially in hidden state and then triggered to change state to normal when variable = x value. Once it is normal the user should not be able to click into the text entry field.
- AndrewDunnCommunity Member
Thanks Wendy & Kamil
That's the workaround I have right now, but it seems a bit clumsy to me. Storyline ought to be able to disable text fields based on trigger events
- WendyFarmerSuper Hero
Give some more context Andrew
Do you only want the field disabled when a certain value is entered? or when any value is entered? is it a text entry or number entry? does the user click a button to 'lose focus'.
Perhaps if you upload the slide and give a bit more information on what you want someone might have a different response for you.
Hi Andrew,
There isn't a trigger to enable/disable - but you could use the transparent shape over the top of the text entry so that the user couldn't type inside it or click on it. That could be trigger to be in a "normal" or "hidden" state based on the value of a variable when the timeline starts.
If you're still having a difficulty time setting this up please share a copy of your .story file so that we can assist.
- AndrewDunnCommunity Member
Hi Ashley. That's exactly what I'm doing now. But it would be neater and less clunky if I could simply disable text entry - it's a pretty standard web form behaviour - maybe Articulate can add this to the list of nice-to-have enhancements?
- AustruyAuroreCommunity Member
Hi Ren,
I made some tests, and it appears that the problem is, when the shape is in a layer.
I've contacted the support, using my account. they are working on the bug.
I attached the file so you can see it.
At the left: the "support team" test, at the right: my test whith the shape in a layer.
When I publish I have the problem. I can click on the text entry field.
- VinceScomaCommunity Member
Hi Aurore,
Thank you for sharing your file! Great call on opening a Support Case as well. I see that Renato is assisting with the Text Entry issue. I am adding your comments to our active report, so we will be sure to provide an update as soon as we have more details to share!
Please let us know if you have any questions!
- NedimRamic-88daCommunity Member
I attached the .story file. The JavaScript code is inside Execute JavaScript triggers. Use it however and whenever you need. In this .story, I show how to simply enable or disable the text entry field with one button based on its state. In reply to Griffin Davis.
- GriffingriffindCommunity Member
Thanks for that Nedim. I have many text entry fields on one slide. How would I tell the Javascipt to disable a specific one?
I tried to change it to reference the text entry field using accessibility text, but it's not working for me.
- NedimRamic-88daCommunity Member
You should change selector querySelector('.acc-textinput') to querySelectorAll('.acc-textinput'). It selects all elements/inputs that match a specified CSS selector and returns a NodeList containing those elements. For example:
var inputs = document.querySelectorAll('.acc-textinput');
if (inputs.length > 0) {
inputs[1].disabled = true;
inputs[1].style.setProperty('color', '#BFBFBF', 'important');
}
It means that only the second element/input (input[0] being the first input) will be disabled. And enabled again with the code below:
var inputs = document.querySelectorAll('.acc-textinput');
if (inputs.length > 0) {
inputs[1].disabled = false;
inputs[1].style.setProperty('color', 'rgba(0, 0, 0, 0)', 'important');
}
This code will work no matter how many inputs you've added to the slide. You just need to know how to properly target the input that needs to be disabled. Check the attached video demonstrating scripts above.- GriffingriffindCommunity Member
That's super helpful Nedim; it works like a charm. Thanks so much!
Is the reason you did this based on the input numbers instead of a unique ID for each input just ease of coding?
- KamilNowekCommunity Member
No, but you can put on your field f.e rectangle with transparency 100% and user won't be able to click on it.
Certainly can understand Andrew and I can pass the message along and you can always add ideas here as well.