Creating fillable text boxes with drop down options
August 25, 2022 12:00 AM
I don't know if this is possible, but I keep thinking it should be because I have seen examples of this in online training before. We have a documentation system that I have taken screen shots of and would like to mimic the live environment the best I can for specific staff training. I have attached the screen shot. What I would like to do is have the user click on the text field and have the option menu pop up. Then if possible, select the correct options to fill the text field. It would also be great to provide immediate feedback. I know it is asking a lot, but hoping it is possible with transparent buttons, actions and vaiables. Let me know if you have any ideas or solutions. Thank You!
Lisa
Solution
Currently the questions variable is put into the entry field. This variable is sorted to make it easier to compare it to the correct solution.
The entry field has its own variable that can be filled in by the clicks on the options.
The actions should be:
On: Select/Change
Action: Modify variable
Target: Entry_0001
Type: Add to variable
Value: Armband
Condition: IF Entry_0001 Does Not Contain Armband
Else:
Action: Modify variable
Target: Entry_0001
Type: Subtract from variable
Value: Armband
You need another action below:
On: Select/Change
Action: Change Contents
Target: Entry_1 (the name of the entry field)
Value: Entry_0001 (the variable of the entry field)
Although it will work with a Multiple Choice question it may be better to use a Multiple Response question instead.
Discussion (8)
There are lots of ways to do it. For instance, you could individually capture each option menu as a graphic, set them all to be initially hidden, and use Actions to reveal them. Group them with buttons that hide them and fill in the field. @timk 's method is probably the easiest.
It should be possible to use Multiple Choice questions, one for each row. Move the "Question Text" field and the radio buttons off stage and style the questions Choice text fields to look like the menu.
Create an entry field and add actions to the radio buttons:
On: Select / Change
Action: Change Contents
Target: The Entry Field
Value: The questions variable
You can use the Feedback options of the question.
I think Carl's option is what I was kind of thinking in my mind. timk's suggestion I believe would require a new page for each question, correct?
Carl would it be possible for you to be more specific on the actions, etc.? I would appreciate it.
Lisa
You can have as many questions on one page as you want. Using questions for it provides you with the built-in engine to check whether the selection was correct, lets you give feedback and a variable to store the answer, all in one object.
You all are truly Rockstars! You have helped me so much. I have one more question...not sure it is possible, but I am learning almost anything is possible in Lectora. I am using the method you suggested with the quiz questions and changing the contents in the entry field. I have a couple of questions with two correct answers. I know I can change the contents when they click on the second option to add the additional text, but what if they click the answers in reverse of what I am expecting. For example:
On the expected response the first click would change the contents to "Verbal-name", the second click would change the contents to "Verbal-name, Armband". But, if they first clicked "Armband" and then "Verbal-name" how would I change the field to "Armband, Verbal-name" since I have already set the text to appear the other way? Let me know if you have questions. Thanks again!! I almost have this project finished thanks to all of you.
Lisa
Currently the questions variable is put into the entry field. This variable is sorted to make it easier to compare it to the correct solution.
The entry field has its own variable that can be filled in by the clicks on the options.
The actions should be:
On: Select/Change
Action: Modify variable
Target: Entry_0001
Type: Add to variable
Value: Armband
Condition: IF Entry_0001 Does Not Contain Armband
Else:
Action: Modify variable
Target: Entry_0001
Type: Subtract from variable
Value: Armband
You need another action below:
On: Select/Change
Action: Change Contents
Target: Entry_1 (the name of the entry field)
Value: Entry_0001 (the variable of the entry field)
Although it will work with a Multiple Choice question it may be better to use a Multiple Response question instead.
Thank you so much @timk It worked and you are awesome for helping me out so much. I really appreciate it!!
LIsa
@lhinterweger2536 ,
...
On the expected response the first click would change the contents to "Verbal-name", the second click would change the contents to "Verbal-name, Armband". But, if they first clicked "Armband" and then "Verbal-name" how would I change the field to "Armband, Verbal-name" since I have already set the text to appear the other way? Let me know if you have questions. Thanks again!! I almost have this project finished thanks to all of you.
Lisa
I'm not 100% sure what you're doing, but have you looked at the "Conditions" functionality of Lectora Actions? You can, for instance, set the text based on what the current text is.