hey guys, I have a similar but much easier problem. I have created a member page where members can create a database item to provide there data. That for I have made a button to give the member the chance to create a new database item. That all work fine so fare.
Unfortunately the “Create new Item Button” stays active and that means members can create unlimited items. This is not wanted. I only want one member to create one item.
My idea now is to compare Loged-In Member ID with owner. If same I want to disable the button. I hope that you get what I want to do.
Because of the filter settings I already have connect the created Items with creators.
This is my poor try. Maybe someone can help:
$w . onReady ( function () {
//prepare datasets
$w ( “#dataset1” ). onReady ( () => {
$w ( “#dataset2” ). onReady ( () => {
//get the values from the inputs
let value1 = $w ( “_owner” ). value ;
let value2 = $w ( “_id” ). value ;
//check the values against each other
if ( value1 === value2 ) {
//hide or show stuff
$w ( “#button2” ). disable (); //shows the submit button on this page
}
}); }); });