2 Replies Latest reply on Sep 13, 2011 1:24 AM by maxwyss

    Radiobutton to Checkbox Conversion


      Hi Scripters,


      Is there any way convert Radiobutton to Checkbox using javascript in Acrobat 7 or above.




        • 1. Re: Radiobutton to Checkbox Conversion
          try67 MVP & Adobe Community Professional

          No, not directly. The way it can be done is by removing the old field and creating a new one in its place.

          I've created a script that can do this with any kind of form fields:


          • 2. Re: Radiobutton to Checkbox Conversion
            maxwyss Level 4

            Short answer: not really


            Longer answer: You can read out almost all properties from a field and/or its widgets, and add a new field with the same properties. Look in the addField() description in the Acrobat JavaScript documentation.


            What you can not read out, are the actions, because Acrobat JavaScript does not have a getAction or getScript method; that you would have to add manually, or, if it is known in advance, using the setAction() method.


            Note that you will also have to restore the tab order, because you deleted and added fields (which is better done in Acrobat 8 or older…).


            The last Acrobat version which would have allowed to change the type of a field (not programmatically, but manually, without having to delete and recreate) was the Best Acrobat Ever, Acrobat 5.


            Hope this can help.


            Max Wyss.