Hi, your logic is correct, you just need the syntax. It’s just like a new language.
To avoid using a bunch of IFs and make your life easier, you can put every G## that you provide service into an array, like:
const arrayOfZipCodesAllowed = [
"G1",
"G2",
"G3",
"G4",
"G81"
]
Then, you can check if the user input includes any of this and return true or false, like this:
$w("#buttonVerify").onClick(() => {
const searchZipCode = $w("#inputZipCode").value //Puts the input value inside a variable
const zipCodeCheckResult = zipCodeCheck(searchZipCode)
if (zipCodeCheckResult) $w("#button2").show()
else $w("#text1").show()
})
function zipCodeCheck(zipCode) {
const checkArrayResult = arrayOfZipCodesAllowed.some(item => item.includes(zipCode))
return checkArrayResult
}