Hi
Please assist how to enable a button if the the current user = the user in the collection.
Database:
Collection: unit
Collection field: member (reference field to member)
Page Elements:
Button: buttonOpen (by default it is disabled)
Pseudo code
if the current signed in user = the member on the current item, enable button else disable button.
Thanks in advance
Just check with Wix Users API about the current user etc.
https://www.wix.com/corvid/reference/wix-users.html
Assuming too, that you would want to query your dataset to check too.
https://www.wix.com/corvid/reference/wix-data.html#query
Then just enable or disable the button in your code to suit your page.
Here are two previous forum posts about similar that you can view the code used.
https://www.wix.com/corvid/forum/community-discussion/multiple-inputs-enable-and-disable-a-button
https://www.wix.com/corvid/forum/community-discussion/disable-checkbox-if-another-checkbox-is-checked