Expand my Community achievements bar.

open form with hidden table

Avatar

Level 5

Hi All.

I have simple form with CheckBox and Table. I show table when CheckBox is True. My code:

form1.#subform[0].CheckBox1::change - (JavaScript, client)

if (CheckBox1.rawValue == true)

    Table1.presence = "hidden";

else

    Table1.presence = "visible";

But I would like to hide Table in case when user open form and then when CheckBox is True show table. In case when CheckBox is False the Table is hidden. How it to do? I will appreaciate for sample.

Thanks.

2 Replies

Avatar

Level 5

Thanks. The problem is solved.

form1.#subform[0]::docReady - (JavaScript, client)

Table1.presence = "hidden";

Avatar

Level 5

Hi,

this is not so difficult. You have to do the following steps:

  1. open a new form.
  2. insert a checkbox and a table into the form.
  3. mark the checkbox
  4. open the script editor (about window)
  5. select "click-event"
  6. write:

if (CheckBox1.rawValue == 1)

{

    Table1.presence = "hidden";

}else

{

    Table1.presence = "visible";

}

And now you have to hide the table under "object" | "presence" | "hidden (exclude from layout)"

Ready.

Kind regards Mandy

PS: Oh I haven't seen that the problem is solved.