adding a variable to a static text box

I need to add a variable to a static text box- can anyone help? The data entry text box comes with a variable, but how do you add a variable to a static text box?

The static text box contains a "model answer" that appears after a student enters their response to a question. I have a javascript that allows students to print out their response (this is simple because the student response section has a variable- it's a data entry text box) but I'd like them to also print out the model answer, which is static text. My javascript needs a variable to work, so I'm trying to figure out how to add a variable to the model answer text.

Any advice would be much appreciated.

2 Replies
Christie Pollick

Thanks for sharing that link, Michael!

And Sam, as you mentioned using JavaScript: you may already be aware, but I wanted to note that we do not provide support for JS modifications to published output. You may, however, find this article on JavaScript Best Practices to be useful, and perhaps others in the community can chime in to assist your further. :)