$w('#listRepeater').onItemReady(($w, itemdata, index) => {
$w('#button7').onClick(() => {
let toInsert = {
"patient": itemdata.title,
"date": $w('#datePicker1').value,
"time": $w('#timePicker1').value,
}
console.log("pass 1")
wixData.insert("appointment", toInsert)
.then((results) => {
console.log("pass 2")
let item = results; //see item below
console.log("pass 3")
})
.catch((err) => {
let errorMsg = err;
}).then(()=>{
$w('#datePicker1').collapse() //do not work
$w('#timePicker1').collapse() //do not work
$w('#button6').show() //do not work
$w('#button7').hide() //do not work
})
})
})
it is just a simple insert function but the last part :
$w('#datePicker1').collapse() //do not work
$w('#timePicker1').collapse() //do not work
$w('#button6').show() //do not work
$w('#button7').hide() //do not work
dose not work where is the error in my code ?
another question if there is an element in a repeater and i want to show it just in the selected item or container without showing in all items or containers in the repeater , can i do that ?and how ?