Expand my Community achievements bar.

Having problem with my script

Avatar

Level 4

Hi All

,

I need help with the following script. I am trying to hide some labels, and fields on a form I am currently working on, but it is not working. Here is the code I had written.

if

(FormsChkbx.rawValue==1)

{

   IssuancesChkbx.rawValue

=0;

   RecordMgmntChkbx.rawValue

=0;

   Stattxt5.presence

= "hidden";

   Stattxt6.presence

= "hidden";

}

Thanks

Luc

2 Replies

Avatar

Former Community Member

Is the form saved as a dynamic Form? Are you getting any errorswhen the form runs (in Acrobat hit Ctrl-J to see the javascript console).

Paul

Avatar

Level 10

Hi,

The syntax is JavaScript, so check that the language is set to Javascript in the script editor.

Also save the form as a Dynamic XML form in the save as dialog.

Make sure that the checkbox has a bound value of '1' in the Object > Binding palette.

Check the references to the objects. The script looks like the checkbox and the other objects are on the same page/in the same subform.

When previewing the form, have a look in the javascript console (by pressing Control+J). When you interact with the checkbox, any errors should show up in the console.

Hope that helps,

Niall