@russian-dima This is what I came up with, still not good:
$w.onReady (function() {
//#text1 gets its values from a database collection
if( $w("#text1").isVisible ) { <--here, I want to say, if #text1 contains any value
$w("#button1").disable();
$w('#text2').text='No file to download. Button disabled!';
}
else {
$w("#button1").enable();
$w('#text2').text='Button functional! Proceed with download';
}
});
I’m experimenting successfully with many TextBox properties (as found here: https://www.wix.com/corvid/reference/$w/textbox) but I can’t find what I’m looking for.
What I want to express is: if #text1 isEmpty/isNull/etc, then disable the button. I CAN disable the button by defining, for example, text1 visibility, but this is not what I want. Do you know how to build the expression above? How to check for #text1 (which is a simple text box (not input, like your example)) having any value or not?