3 Replies Latest reply on Jun 24, 2012 9:52 AM by CustodyHelp

    checkbox code

    CustodyHelp

      Hello,

       

      I have been getting the hang of doing basic coding for textboxes, but the checkboxes I am having some trouble with,  If anyone could help me with the following that would be great..

       

      Thanks..

       

      The main thing is automatically checking 1 of 2 checkboxes in #3 below.., based on a couple certain factors..

       

      First question to determine who user is defining a visitation plan for, them or other party..

      1. Is Visitation plan for You <checkbox> or  Other Party <checkbox>

       

      Second question is to determine Who they they were or "You" above was, either Petitioner or Respondent.

       

      2. Were you the Petitioner or Respondent?  Petitioner <checkbox> or  Respondent <checkbox>

       

      Next is to check the box that needs to be checked..

       

      3. Visitation plan is for Petitioner <checkbox> or Respondent <checkbox>

       

      Petitioner in #3 would get checked if, You is checked in #1, and Petitioner is checked in #2

      Respondent #3 would get checked if, You is checked in #1, and Respondent is checked in #2

       

      or

      Petitioner in #3 would get checked if, Other Party is checked in #1, and Respondent is checked in #2

      Respondent in #3 would get checked if, Other Party is checked in #1, and Petitioner is checked in #2

        • 1. Re: checkbox code
          CustodyHelp Level 1

          Hello, isn't there a way with javascript to, upon mouse up, check to see if another box is checked or not, and based on the result, to check a different checkbox from within that checkbox?

           

          Thanks

          • 2. Re: checkbox code
            gkaiseril MVP & Adobe Community Professional

            And if box 1 or 2 is not checked what do you want to occur?

             

            Yes you can but you need similar code to run for the first 2 check boxes' values but until the cursor leaves the field you need to use the 'event.value'. Unchecked boxes have a a value of "Off".

             

            I would use 3 exclusionary groups for the 3 check boxes, it just makes coding easier.

            • 3. Re: checkbox code
              CustodyHelp Level 1

              Hello GKaiseril,

               

              Thanks for the assistance, I didn't think about that, but the whole operation would happen only if one of the boxes in #1 is checked, if not.. then nothing would apply