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

problem with hidden/invisible table

Avatar

Level 2
hi



i am trying to make invisible or hide a whole table in a dynamic form using a checkbox, i have this formcalc in the change event.



if (this.rawValue == 1)

then

Table1.presence = "visible";

else

Table1.presence = "hidden"

endif



Any ideas?
5 Replies

Avatar

Level 10
Check the java console and see if you are getting any errors. Is the form saved as dynamic?

Avatar

Level 4
i dont think you need "then" or "endif"



your code should look something like this:



if (this.rawValue == 1)

Table1.presence = "visible";

else

Table1.presence = "hidden"

Avatar

Level 2
hi



thanks for reply



the pdf render format is dynamic at the moment it is a .xdp file.



there are no errors in the java box (ctrl J)



i do get a syntax error near token "'hidden'" on line 7



----

it is not essential that the visibility of the table be controlled by a check box. in fact it would be better if the table would autohide itself if no addInstance(1) were selected. but i dont know how to do that either

Avatar

Level 10
So you do have javascript errors. The code should look like this:



if (this.rawValue == 1){

Table1.presence = "visible";

}else {

Table1.presence = "hidden"

}



Lets make it work with the checkbox 1st, then we can write a test for the addInstance (as you say).

Avatar

Level 2
thanks paul code worked a treat thanks again for help