Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

Level 3
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
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
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).