7 Replies Latest reply on Mar 29, 2009 8:25 PM by (Michael_Frommer)

    Help display count of Check Boxes if 'checked' - I don't know JS

      Hello. Please help me. I don't know JS at all. Would someone write the script for me? Please? I am using Acrobat 8 Pro on Windows Pro.

      I have created a form to register for 2 consecutive events of my not-for-profit organization; which allows for up to 4 registrants per form. There is a different registration fee for members and non-members for each event. I want to populate several (4 different) Text Boxes which will show the count of: members for event 1, non-members for event 1, members for event 2, and non-members for event 2, based on the selections made of Check Boxes.

      * Using Check Boxes, each registrant must select if they are a member or non-member using:
      - - - Check Box Names: AttendeeType1, AttendeeType2, etc.
      - - - Export Value: Member or Non-Member

      * Using Check boxes, each registrant must select one or both events they which to attend using:
      - - - Check Box Names: Dinner1, Dinner2, ect., and Workshop1, Workshop2, etc.
      - - - Export Value: Yes

      I imagine I need a script in each of the Text Boxes in which I want the respective count to auto populate:
      - - - Text Box Names: NumberMemberWorkshop, NumberNonMemberWorkshop, NumberMemberDinner, NumberNonMemberDinner.

      Thanks in advance for your assistance.
        • 1. Re: Help display count of Check Boxes if 'checked' - I don't know JS
          DimitriM Level 3
          Hi Michael,

          This is not a single, simple script you are asking for. It would be difficult for someone to provide a complete scripting solution for you here without having the form to work on, and I think it would require hours of work.

          These forums, including acrobatusers.com are typically for single, direct questions that can be answered in a few minutes. For example, if you have tried creating a script and it is not working this is a place to ask what is wrong with your attempt.

          Maybe you will get lucky and someone will have a few hours free time to get the form from you and do the work, or will provide a link to a form they already have that has similar functionality. But please don't be dissappointed if that doesn't happen. People that post here don't get paid for it and most have regular jobs.

          Have you spent any time researching the Acrobat JavaScript resources at acrobatusers.com? There are very basic beginner tutorials that are helpful for getting started.

          Hope this helps,

          Dimitri
          WindJack Solutions, Inc
          www.windjack.com
          www.pdfscripting.com
          • 2. Re: Help display count of Check Boxes if 'checked' - I don't know JS
            Level 1
            Dimitri,

            Thank you for taking the time to respond. I wasn't aware that what I wanted to accomplish would be so complicated a task. I was hoping it was more of an 'If this is A and that is B count...' or something like that.

            I'd be happy to email the PDF file to a volunteer willing to try, but I do understand that this is a user forum; we all have real jobs. (In fact, I'm a volunteer with the organization I'm doing this for.; besides my real job.)

            I have been searching tutorials on acrobatusers.com for the past few hours and have found some very interesting things, that give me ideas for future projects/forms, but I havnt been able to find anything yet that appears to be similar to what I'm trying to do.

            Again, it's always appreciated when some responds without rebuke. Even if they cant give a definite solution.
            • 3. Re: Help display count of Check Boxes if 'checked' - I don't know JS
              DimitriM Level 3
              Hi Michael,

              I didn't mean to say the task was complicated- just time consuming and not easy to answer fully in this setting.

              Dimitri
              WindJack Solutions
              www.windjack.com
              www.pdfscripting.com
              • 4. Re: Help display count of Check Boxes if 'checked' - I don't know JS
                Level 1
                Samnol,

                What's that URL suppose to give me. It sends me to a web osting company. I already have one, thank you.
                • 5. Re: Help display count of Check Boxes if 'checked' - I don't know JS
                  DimitriM Level 3
                  Hi Michael,

                  Have you watched Lori Defurios' e-seminar at AUC on "Getting started with Acrobat Forms?" While not exactly what you asked for, there is an excellent example of a registration form and a good explanation of hierarchical field naming for adding costs of a variety of items into text fields based on check box selections. The example file you can grab from the File SharePod while viewing the video is called Student Handout and the 1C form should be helpful.

                  https://admin.adobe.acrobat.com/_a200985228/p17266135/

                  Hope this helps,

                  Dimitri
                  WindJack Solutions
                  www.windjack.com
                  www.pdfscripting.com
                  • 6. Re: Help display count of Check Boxes if 'checked' - I don't know JS
                    Level 1
                    I don't have the time this afternoon to do so, but appreciate all suggestions so I can learn. I will take a look at that tutorial when I have the available time, maybe later this evening.
                    • 7. Re: Help display count of Check Boxes if 'checked' - I don't know JS
                      Level 1
                      Well, I did it.

                      Using some of the basics I gathered through my reading and the help I got in a couple of other threads (on some specific syntax issues) I got the form to do what I wanted.

                      Being a newbie at this I'm sure many of you would tell me I took the long way to acheive my goal, but I'm happy as long as I got the result I wanted. I had to create 16 hidden text boxes (in groups of 4) in which I used a respective script that called to (referenced) the check boxes. Then I summed each group of 4 boxes.