Forum Discussion

jonathanw's avatar
jonathanw
Community Member
6 days ago
Solved

Jump to next slide on entering correct text into a text entry field

Sorry, I know this has been discussed before but I cannot find the thread. I am creating a software simulation where the module needs to move to next slide immediately on entering the correct text ...
  • Nedim's avatar
    5 days ago

    Try this simple code and ensure the triggers are replicated as shown below. I’ve attached a story file just in case.

    const input = document.querySelector(".acc-textinput");
    setVar("TextEntry", "");
    input.addEventListener("keyup", () => {
      setVar("TextEntry", input.value.trim().toLowerCase());
    });