Doubtful Ryan as they use two different methods to render the text.
If I was trying to solve that problem I would use Javascript running on the input field, or perhaps simpler (depending on what you want to achieve) is to put a text field behind the input field and have the variable display there.
As soon as a user clicks on the input field to type, you can hide the variable text.
Kind of like one of those web forms that says "Enter name" in light grey which magically disppears when you start typing.
Hmm bummer! I have a course where users create a list which I'm saving as a variable and I want them to be able to come back and edit that list... Sounds easy enough, but I can't seem to wrap my head around it. Thanks again!
Yay! Got it sorted with some Javascript. For anyone wanting to load a Storyline variable in to an input text field, here's my code:
First I execute this on timeline start where userMadeList is my original list I want to access and listUpdate is the new text entry for learners to update their list.
var player = GetPlayer(); var userMadeList = player.GetVar("userMadeList"); player.SetVar("listUpdate", userMadeList);
Then I execute this Javascript when the listUpdate text fields updates:
var player = GetPlayer(); var listUpdate = player.GetVar("listUpdate");
Maybe I misunderstand what you are trying to do, but you can use a trigger to set the value of the variable attached to the text field to anything you want. See attached a quick example.
4 Replies
Doubtful Ryan as they use two different methods to render the text.
If I was trying to solve that problem I would use Javascript running on the input field, or perhaps simpler (depending on what you want to achieve) is to put a text field behind the input field and have the variable display there.
As soon as a user clicks on the input field to type, you can hide the variable text.
Kind of like one of those web forms that says "Enter name" in light grey which magically disppears when you start typing.
Not sure if any of that helps! :)
Thanks Andrew and sorry for the late reply! :)
Hmm bummer! I have a course where users create a list which I'm saving as a variable and I want them to be able to come back and edit that list... Sounds easy enough, but I can't seem to wrap my head around it. Thanks again!
Yay! Got it sorted with some Javascript. For anyone wanting to load a Storyline variable in to an input text field, here's my code:
First I execute this on timeline start where userMadeList is my original list I want to access and listUpdate is the new text entry for learners to update their list.
var player = GetPlayer();
var userMadeList = player.GetVar("userMadeList");
player.SetVar("listUpdate", userMadeList);
Then I execute this Javascript when the listUpdate text fields updates:
var player = GetPlayer();
var listUpdate = player.GetVar("listUpdate");
player.SetVar("userMadeList", listUpdate);
Maybe I misunderstand what you are trying to do, but you can use a trigger to set the value of the variable attached to the text field to anything you want. See attached a quick example.
This discussion is closed. You can start a new discussion or contact Articulate Support.