Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

Check box only visible when data is entered in two other fields


Level 3

My form has a table in which one column's cells are check boxes. I would like the check boxes to be only visible when both the quantity and unit price cells are filled out.

If I use the following script to hide the checkbox, it becomes my Amount??? which is the column right next to it.

taxable.presence = "hidden";

I am putting the script in the initialize event of the table.

2 Replies


Level 10

The initialize event only fires once the form is opend, not afterwards when the fields values are changed.

You need another event such as layoutReady.

this.presence = !Quantity.isNull && !UnitPrice.isNull ? "visible" : "hidden";


Level 3

Thanks for the pointer. I tried your script in the layoutReady event of the cell but I get the same behavior as before. The cell is initialy hidden, but when I enter data in quantity and unitPrice, the checkbox cell behaves like the Amount cell ( qty * price).