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

SOLVED

how to control/get a specific instance item "from outside"?

Avatar

Level 3

Hi,

I use a function in my scripting object to control my flowed, repeatable  subforms.

Each subform contains a CheckBox

form structure:

     page 1

          mysubform 1               (flowed, repeatable subform)

                    CheckBox

          mysubform 2               (instance number "2")

                    CheckBox

          mysubform 3               (instance number "3")

                    CheckBox

          ...

          mysubform n               (instance number "n")

                    CheckBox

// click event on CheckBox

     doProcessOnSubForm(this):

// scripting object

function doProcessOnSubForm(CheckBox){

     var InstanceOfMysuborm = CheckBox.parent._mysubform;

     console.println(InstanceOfMysuborm.count); // Outupt = 3, so I have 3 mysubforms

    

     // make only instance number 2 invisible

     InstanceOfMysuborm.SOMEmagicCODEtoGETitemNUMBER2.presence = "hidden";

}

does anyone has any idea how I can get the "item" number 2 of mysubform?

p.s. I am not looking for removeInstance ; )

Thank you

1 Accepted Solution

Avatar

Correct answer by
Level 3

solved it by myself

xfa.resolveNode("...pathToSubform...[" + 2 + "]").presence = hidden;

View solution in original post

0 Replies

Avatar

Correct answer by
Level 3

solved it by myself

xfa.resolveNode("...pathToSubform...[" + 2 + "]").presence = hidden;