Disable button when inputbox value is empty

I have a inputbox named NewClientName. I also have a submit button that will pass the client name to a stored procedure to run a series of SQL scripts. I can't find the correct syntax to disable the submit button when the NewClientName.value is blank. I tried {{NewClientName.value}}="" and that doesn't work.


A single equals is an assignment operator. To do comparisons you need 2 (ideally 3), and wrap all the code inside the double brackets.
ie {{NewClientName.value === ""}}

Thanks Dave. I tried everything but putting the value inside the brackets. I also tried double apostrophes and double quotes. Can you tell me the difference between == and === and the apostrophes vs quotes?


comparing values with 2 equals does some implict conversion eg
"1" == 1 -> true
1 == 1 -> true
1 == true -> true

comparing values with 3 equals is strict comparison, which means it also checks the type of the value. eg
"1" === 1 -> false
1 === 1 -> true
1 === true -> false

This is important when, for example, you're trying to insert a number into a database and you want to check that the value is numeric not a string or boolean etc
Ideally you'd always use ===

Double quotes and single quotes are functionally the same but double quotes have the advantage that you don't need to escape single quotes within the string. eg
"Don't have to escape single quote"
'Dont't have to escape single quote'

Thanks. That’s very helpful!