I am trying to figure out whether I can make this button disabled forever(even after one reloads the page or switches to another page and then switches back) on the user's side after they click it.
Here is what I currently have for the button as it individually adds to a number value.
import wixData from 'wix-data'; export function yesButton_click(event) { $w("#yesButton").disable(); $w("#yesButton").label = "Thanks For Voting"; wixData.query("answers").find().then((result)=>{ let answersitem = result.items[0]; let id = answersitem._id; answersitem.yesfield++; wixData.update("answers", answersitem).then(()=>{ $w("#dataset1").refresh(); }); }) ; }
pls add the updated code
Do you require users to be logged in? And how long is "forever"? Until the browser window is closed or literally forever?