Thanks Esther, everything is on one slide. The text input field is on the base slide. There is a base slide and nine layers. Eight layers have answers to some common questions about COVID-19. The ninth layer is a catch-all if the code I created could not interpret the question being asked.
I created a variable to capture all the words the user types in the text field and when the text field loses focus a JavaScript trigger runs. In the JavaScript, I created eight arrays (one for each question). These arrays contain keywords related to the question. When the JavaScript runs it compares the typed text stored in the variable to each of the arrays. If a keyword is found it sets a variable for the array to true.
Then in Storyline I have triggers that say if such and such variable is true show layer x.
If none of the variables are true then show the catch-all layer.
It is not perfect because there is a lot of guesswork in what keywords to use and I only did a small subset of possible questions and answers but this code could be easily expanded and used for a lot of different types of scenarios.
I am going to post the source.