Hello @saganwork , I took a look at your code and the only really wrong thing missing is the parentheses in you function call. But your code is in desperate need of a refactoring (rewriting some parts of it to make it clearer).
$w.onReady(function () {
toggleEntry() //This is wrong in your code
})
I would do something more like this:
$w.onReady(() => {
$w("#dbComp").onReady(() => { //You call the dataset onReady after the page is ready
toggleEntry() //Then you call your function
})
})
function toggleEntry() {
let currentUser = $w("#dbComp").getCurrentItem().entered
if (currentUser === "Yes") {
$w("#columnStrip1").hide()
$w("#strip2").show()
} else {
$w("#columnStrip1").show()
$w("#strip2").hide()
}
}
The last function attached to your submit button is something that I could not understand (functionally) properly. I got what it is doing, but not why.