If function from Database

Hi there, how would you fetch a string from a field in the database and if the value of that field is “X” then I want enable a button or disable if it is “Y”.

Hi,

on page ready use wix data query http://www.wix.com/code/reference/wix-data.html#query
then use http://www.wix.com/code/reference/$w.Button.html#disable for the button

Shlomi