Forum Discussion
DesignTraining
2 years agoCommunity Member
Triggering feedback layer if text entry field contains certain words
Hi there,
I am building a "restating exercise" where I want the learner to practice rephrasing a statement using a data entry text field. The statement may not contain certain words, such as "don't" or "stop".
So, I want a feedback layer to be triggered once the learner is finished entering their text in the text entry field, IF their text contains certain words.
Help please.
Thank you:)
Susann
- WaltHamiltonSuper Hero
Susann,
Here is a js that checks for certain words or variations of them. You create the words in variables, and run the js. It tells you if and how many of the words are found. From there, you can take whatever action you want. My sample says they are correct, but you can easily change it to handle them as incorrect.