Check if a field is empty and display to span the result ternary operator

I try if is == ‘’ so empty then display is empty and if filled is not empty but not really want to do?

Any idea?

If set value =“blablabla” that also display is empty.



There is no trigger to make this function work. When the user types something in the input box, you need to add an onchange event to capture the input value and run it through the ternary operator. Else you can add a submit button with onclick event, which will capture the input value when clicked.

I suggest you store the input text box value in a variable and then use ternary operator to check if the variable is empty or not.

Hope this helps :+1:

1 Like