3 Replies Latest reply on Aug 5, 2011 1:28 PM by JLAFARGUE

    HELP with flowing form – changes effect the correct subform

    ParreLaws Level 1

      I've created a form that adds a subform of information. In this subform there is a radio button that automatically updates various text fields in the form. The problem I'm having is when I click the Add button and get a new subform of information and click the new radio button it changes the first set of text fields. Can someone assist me with making the radio buttons changes only the text fields in the new subform? Please see example below.

       

      LiveCycle Sample.jpg

       

      This is the if statement I in the under change

       

      if
      (this.rawValue == "1"){
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct101.rawValue = "X"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct102.rawValue = "X"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct105.rawValue = "-"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct103.rawValue = null
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct104.rawValue = null
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct103.access = ""
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct104.access = ""
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct105.access = "protected"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct101.access = "protected"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct102.access = "protected"
      }  

       

      else if
      (this.rawValue == "2"){
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct101.rawValue = "X"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct102.rawValue = "X"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct103.rawValue = "X"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct104.rawValue = "X"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct105.rawValue = "X"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct101.access = "readOnly"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct102.access = "readOnly"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct103.access = "readOnly"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct104.access = "readOnly"
          form1.CashTransfer.FOneTMul.AcctSM.From.Acct105.access = "readOnly"
      }

      else {
           form1.CashTransfer.FOneTMul.AcctSM.From.Acct101.rawValue = null
           form1.CashTransfer.FOneTMul.AcctSM.From.Acct102.rawValue = null
           form1.CashTransfer.FOneTMul.AcctSM.From.Acct103.rawValue = null
           form1.CashTransfer.FOneTMul.AcctSM.From.Acct104.rawValue = null
            form1.CashTransfer.FOneTMul.AcctSM.From.Acct105.rawValue = null
           form1.CashTransfer.FOneTMul.AcctSM.From.Acct101.access = ""
           form1.CashTransfer.FOneTMul.AcctSM.From.Acct102.access = ""
           form1.CashTransfer.FOneTMul.AcctSM.From.Acct103.access = ""
           form1.CashTransfer.FOneTMul.AcctSM.From.Acct104.access = ""
           form1.CashTransfer.FOneTMul.AcctSM.From.Acct105.access = ""    
      }

       

      Thanks for any assistance.

      Parre

        • 1. Re: HELP with flowing form – changes effect the correct subform
          rajesh9g Level 2

          Hi Parre,

                I suspect something might we referencing to the objects of your first subform. Can you please share with me the PDF that you are working on? i can make corrections and send you back.

                I have a sample implementation similar to your requirement, please refer to the link below and this should help you in fixing the bug

           

          https://sendnow.acrobat.com/m/g.ashx?i=HrFhIcY0lN4-AAXEY8wdCg&x=aEgw04LdgFDon-o9heLWnQ

           

          thanks,

          Rajesh

          • 2. Re: HELP with flowing form – changes effect the correct subform
            ParreLaws Level 1

            Hello Rajesh,

             

            Thank you for reviewing the attached PDF. Please know that any assistance

            would be greatly appreciated.

             

            Thank again,

            Parre

             

             

             

             

             

             

            From:   rajesh9g <forums@adobe.com>

            To:     Parreshea Laws <pld1@ntrs.com>

            Date:   07/07/2011 12:55 PM

            Subject:        HELP with flowing form –

            changes effect the correct subform

             

             

             

            Hi Parre,

                  I suspect something might we referencing to the objects of your

            first subform. Can you please share with me the PDF that you are working

            on? i can make corrections and send you back.

                  I have a sample implementation similar to your requirement, please

            refer to the link below and this should help you in fixing the bug

             

            https://sendnow.acrobat.com/m/g.ashx?i=HrFhIcY0lN4-AAXEY8wdCg&x=aEgw04LdgFDon-o9heLWnQ

             

             

            thanks,

            Rajesh

            • 3. Re: HELP with flowing form – changes effect the correct subform
              JLAFARGUE

              I don't see you using the index of the subform anywhere in your code.  LiveCycle might then default to the first instance of the subform. 

               

              Try adding something like this to your code of the click event of your radio button:

               

              var i = parent.instanceManager.index; 

               

              Then use i to index your subform.  It might look something like this if your subform you add is AcctSM.

               

              var i = parent.instanceManager.index; 

              if
              (this.rawValue == "1"){
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct101.rawValue = "X"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct102.rawValue = "X"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct105.rawValue = "-"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct103.rawValue = null
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct104.rawValue = null
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct103.access = ""
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct104.access = ""
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct105.access = "protected"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct101.access = "protected"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct102.access = "protected"

               

              else if
              (this.rawValue == "2"){
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct101.rawValue = "X"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct102.rawValue = "X"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct103.rawValue = "X"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct104.rawValue = "X"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct105.rawValue = "X"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct101.access = "readOnly"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct102.access = "readOnly"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct103.access = "readOnly"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct104.access = "readOnly"
                  form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct105.access = "readOnly"
              }

               

              else {
                   form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct101.rawValue = null
                   form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct102.rawValue = null
                   form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct103.rawValue = null
                   form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct104.rawValue = null
                    form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct105.rawValue = null
                   form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct101.access = ""
                   form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct102.access = ""
                   form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct103.access = ""
                   form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct104.access = ""
                   form1.CashTransfer.FOneTMul.AcctSM[i].From.Acct105.access = ""   

              }