Avatar

Correct answer by
Level 5

Hi Raj,

I'm not sure if I understand you right..

  1. Subform 2 and 3 don't need a script in the initialize - Go to Object | Subform | Presence | Hidden (Exclude..)
  2. If the user click the add-Button you don't need the If-Condition
  3. I would write
    1. this.resolveNode("subform2").presence = "visible";  // OR xfa.resolveNode("subform2").presence = "visible"; OR subform2.presence = "visible";
    2. this.resolveNode("PRI_DES2.PRI_FLAG2").rawValue = "X";   //OR xfa.resolveNode("PRI_DES2.PRI_FLAG2").rawValue = "X"; OR PRI_DES2.PRI_FLAG2.rawValue = "X";
  4. The last script I would not write in the form ready Event. Why you use this event?
  5. If you make the subform 2 an 3 hidden, you have to reset the entries in my opinion. You can use the following script: xfa.host.resetData("xfa.form.fomr1.subform2");

Sorry my english isn't the best. I hope I could help a little bit,

Mandy

View solution in original post