App Lab coding question

My students are creating a digital breakout using the App Lab. Some want to use text as one of the locks. They are wondering how they can have their app recognize text input when it is correct, and then go to another screen. We know how to link screens, but not how to incorporate the appropriate if-then code using text.

Molly,

You’ll want to create a variable to assign the userInput to and then check that variable against the answer in an if/else conditional. Check out the project below for an example.

Hope that helps, sounds like a great idea!
Brad

1 Like

I am working on a breakout room app as well. My problem is that the text input box is showing a list of autocomplete answers, for every correct answer I’ve tested. Wrong answers are not on the list. I would like to clear the autocomplete. What code do I need to add?

I tested by sending my phone and my laptop the app, and my test answers from development on the PC were still on the autocomplete list.

See my project here: App Lab - Code.org

Thank you!!

I ended up working around by creating a new text input every time the code is run, and deleting it at reset. I added a counter and used it to name the text input, so each new one was a truly new element and had no history to pop up.

1 Like

Clever! I could be wrong- but I think those autocompletes are stored in YOUR computer because you’ve been typing them in. This wouldn’t show up on a student’s computer. I guess if they’re sharing devices, that could be a problem. Neat workaround!

1 Like

Is there another possible solution to remove autocomplete answers? Students play with each other apps as a gallery-walk-type activity. Removing the autocomplete text would make trivia games more fun.

This is a browser setting that is different from browser to browser. The link below is one of many that will show you how to disable it, but I don’t believe that it can be disabled other than through your browser settings.

https://support.mindbodyonline.com/s/article/203260523-How-to-disable-the-form-autofill-feature-in-your-browser?language=en_US

Mike