5 Replies Latest reply on May 15, 2011 8:56 PM by marcochong

    Checkboxes - How to validate?

    marcochong

      Hi,

       

      I have created a simple form with a few check boxes and wanted to know how I prevent users from selecting more than one checkbox from a group of 2 or more using Javascript.


      Appreciate if someone can guide me or provide a sample code which I can use. If it helps, I am using Adobe Acrobat Pro 8. Thanks.

       

      Rgds,

       

      Marco

        • 1. Re: Checkboxes - How to validate?
          MarkWalsh Level 4

          Javascript isn't necessary. Just give all of the checkboxes in each group the same name, but different export values.

          • 2. Re: Checkboxes - How to validate?
            marcochong Level 1

            Hi Mark

             

            Thanks for your response. Not exactly what I am looking for. The information submitted on the form is not meant to be gathered and reviewed via Adobe. It's just a fancy way for people to submit an electronic form that will eventually either be printed out and stored as a hard copy or just archived as a softcopy. We just wanted to use PDF instead of a word document or excel for a form format. Does this make sense? So I am still looking for javascript for my form.

             

            Appreciate any help available.

             

            Rgds,

             

            Marco.

            • 3. Re: Checkboxes - How to validate?
              MarkWalsh Level 4

              I don't know what you mean; my response does not have anything to do with whether or not you're gathering data from the form or printing it. If you want to create a set of checkboxes where the user can only select one of the options, this is how it's done in Acrobat. Javascript is absolutely unnecessary to do what you want (and, IMHO, would complicate things much more than necessary)

              • 4. Re: Checkboxes - How to validate?
                George_Johnson MVP & Adobe Community Professional

                You may be misunderstanding what Mark means by "export value". This is merely the property name of the value of the check box when it's selected. This value is settable by you on the Options tab of the field properties dialog. The value of a check box when it's unchecked is equal to the string "Off".

                1 person found this helpful
                • 5. Re: Checkboxes - How to validate?
                  marcochong Level 1

                  Thanks Guys, you are both right and yes I misunderstood Mark. I managed to find out eventually what you meant and made the necessary changes to my form. Works perfectly and defintely was more simple and straightforward!

                   

                  Appreciate all the help very much.

                   

                  Rgds,

                   

                  MC.

                   

                  Message was edited by: marcochong