Tutorial: Search a Text Entry Field for Keywords or Phrases

Have you ever wanted to check if certain keywords or phrases have been typed into a Storyline text entry field? 

Maybe you want to count how many important terms have been included in a learner's response to ensure that they have a solid grasp on the subject matter? Or perhaps you want to check if they've used a particular phrase as part of their response?

In this tutorial, we will look at how to use JavaScript to analyse the text entered into a Storyline text entry field and count how many times particular keywords are mentioned.

Click here to see a demo and here to download the source file.

Let me know if you have any questions.

1 Reply
Susan Chen

Hi Mat,

I have a text entry exercise where the different response will be displayed based on what a user will type. In other words, the text entry will be validated. I want to validate if the entry contains certain keywords I am looking for, regardless the cases (Storyline 360 has this function), or spaces before or after the keywords, or plural forms, or other synonyms, or a full sentence, as long as it contains two keywords.

I do not know much about JavaScript. Looked at your demo and source file, don't think your solution solves my need. Can you or anyone help?