Hello I am looking for a way to use variables to fill in a text box. Let's say I have a picture of a phone. I want to put hot spots on the number buttons so as the user clicks on the buttons the text box will fill in with the numbers the user clicks.
You can add a reference to a variable into a text box (see a tutorial on text variables and references here). Here is an example of a 'phone entry'-style interaction. In this case, the user was forced to click the keypad buttons in a certain order. This could be adapted to whatever is needed.
That example is exactly what I need to do, so i can put multiple variable in a text box but have to force the user to do it in a certain order. I think I can do that. Do you kow if a way to do that so they do not have to punch the numbers in a certain order?
Hi Rob, see attached the source file for this example. The file might be a bit messy (I just did this sample very quickly), but hopefully it gets you started.
So I played around with it. You can enter it in any order if you use Javascript.. obviously this will require programming but it's pretty cool.
Have a look.
Donna
P.S.
I think there are limitations to where the javascript will work.. I don't think it will work on the IPAD. You may also have to figure out the text area but ya.. this is great.
No problem. Although it was really mostly our resident javascript expert here.. I just had to have him do it! It was driving me crazy trying to figure it out.. hehehe..
11 Replies
Hello Rob,
If I understand what you did correctly, this should do it.
1. Create a Numeric Entry
2. Create your buttons then add the trigger to adjust the Numeric Entry to equal the assigned numeric value when user clicks on it.
3. Insert Reference in the Numeric Entry.
Hope this helps,
Donna
You can add a reference to a variable into a text box (see a tutorial on text variables and references here). Here is an example of a 'phone entry'-style interaction. In this case, the user was forced to click the keypad buttons in a certain order. This could be adapted to whatever is needed.
That example is exactly what I need to do, so i can put multiple variable in a text box but have to force the user to do it in a certain order. I think I can do that. Do you kow if a way to do that so they do not have to punch the numbers in a certain order?
Hi Rob, see attached the source file for this example. The file might be a bit messy (I just did this sample very quickly), but hopefully it gets you started.
Hi Rob! Looks like you are getting the assistance that you need here
Thanks Michael!
Great, thanks for the file. I see what I can do. I just have to make sure they punch in the number by a certain order.
Hello Rob,
So I played around with it. You can enter it in any order if you use Javascript.. obviously this will require programming but it's pretty cool.
Have a look.
Donna
P.S.
I think there are limitations to where the javascript will work.. I don't think it will work on the IPAD. You may also have to figure out the text area but ya.. this is great.
IPAD, not there yet, still just working through the LMS. Some day we will go mobile.
Love what you did. Perfect
Thanks Donna
No problem. Although it was really mostly our resident javascript expert here.. I just had to have him do it! It was driving me crazy trying to figure it out.. hehehe..
Hey, I'm all about using your resources!
This discussion is closed. You can start a new discussion or contact Articulate Support.