Pop Up Message/Entry Box Display Variables

Hello Lectora Community!

I am working on a pop up that I want to display information from entry boxes. The issue is, I have 7 entry boxes but, students can advance to the answer after completing only 3 entry boxes.

How do I not display the ~~~null~~~ which shows when students don't type a response in entry boxes?

Attached is the action target where I input the variables and then what it looks like in the LMS.

Thanks!

Deron

Popup-Message-Input.jpgPopUp-Message.jpg

Discussion (3)

Instead of directly putting those variables into the message, you can use another variable that contains only the values of entry fields that have been filled out. Create a variable, e.g. "summary".

Then add some actions to the button that shows the message. All these actions must be before the "Show message" action.

1. Reset summary

On: Click

Action: Modify variable

Target: summary

Type: Set as empty

2. Add one action for each entry field

On: Click

Action: Modify variable

Target: summary

Type: Add to variable

Value: VAR(Entry_0001)

Only if: Entry_0001 is not empty

Repeat for Entry_0002 etc.

3. Modify your Show message action to only display "VAR(summary)"

Tim

Tim,

undefined

Thanks for the quick assist on this!

I have updated the course to include your actions and variable but, now I get the "literal" input from the variable (see attached).

Thoughts on how to get the finished answer versus every key stroke?

Thanks,

Deron

Popup25.jpg

Alrighty...I figured it out!

It was taking the literal key strokes but I changed up the action to reset to empty like Tim said. But, I had the action on the page show rather than the button to submit answers. While this fixed the literal sense of each key stroke, I still got the ~~~null~~~ if there wasn't an answer.

I had to add another action to each line saying set to "N/A" if empty to get the ~~~null~~~ out of the message.

Thanks for your help Tim...got me on the right track to work through the issue!

Deron

PopUp42.jpg

Discussions have been disabled for this post