Forum Discussion

JoyZanni's avatar
JoyZanni
Community Member
2 years ago

Text Entry Value displayed as drop-down menu when course is revisited.

Hello E-Learning Heroes Team!

I'm building an excel simulation course using the Text Entry variable feature. I'm running into an issue where the use can view previously typed responses in drop-down form when populating a new version of the course.

Question:

  • Is there a trigger I can create to remove the Text Entry history so to speak?

Attached is an image of what the user sees.

  • Hi Joy,

    I'm happy to help troubleshoot this issue and would like to start with clarifying questions to understand your experience better.

    1. Did you publish to Web, LMS, or Review 360?
    2. Browser settings may cause the text history to popup. What browser and browser version are you using to test the course?
    3. If you're comfortable sharing your file with us, we'd be happy to take a look to investigate further. You can upload it here or privately in a support case. We'll delete it when we're done testing.

    I'm looking forward to your response.

  • It is autocomplete in the browser try adding this as a javascript trigger on timeline start of your slide.

    var els = document.getElementsByTagName('input');

    for (var i=0; i < els.length; i++)
    {
    els[i].setAttribute("autocomplete", "off");
    }
    • ElizabethPat123's avatar
      ElizabethPat123
      Community Member

      Thank you, Phil.  The code above did not work for me in Chrome but when I asked ChatGPT for an assist to make it work, she/they/it said I needed a delay because "Sometimes, Chrome’s autocomplete overrides your JavaScript if it runs too early."

      This modification of your code worked: 

      setTimeout(() => {
          var els = document.getElementsByTagName('input');
          for (var i = 0; i < els.length; i++) {
              els[i].setAttribute("autocomplete", "off");
              els[i].value = ""; // Clear the input value explicitly
          }
      }, 100)

      Thanks for being a Superhero!