I have been stuck on this for days and I am going crazy. I have a fillable form for work. It is an application and people need to use it to fill out information about their family. The often need to check Male or Famale or answer Yes/No questions.
Unfortunately we cannot redesign this form as that would be a very large undertaking. There is no room for radio buttons or check boxes and when I tried to place them on top of the options, the form became very cluttered and nearly illegible.
After searching the Adobe forums I found an example of a form with a button that mimicked a check box using custom javascripts. I have tried and tried to get this to work for our form, but I am hopelessly lost. I am new to any sort of javascripting so any help is imensely appreciated.
The pdf that I am using as a reference can be found here: https://acrobat.com/app.html#d=JBzD4guSToeYu0qLkvfvgA
When I run javascript debugger it says the following:
TypeError: getField("buttonOn") is null
4:Document-Level:init
Other information:
I am running Adobe Acrobat X Pro on Windows XP.
I created that sample, and what that particular error means is that you did not copy the button named "buttonOn" that's located at the upper-left corner of the page. It is the source of the circle that's used in the other buttons that simulate the check boxes. You have to copy the other one as well, which is the souce of a blank icon for an unchecked simulated check box.
Thank you so much for creating this as a reference! It has been great except for this little snag which is ultimately due to my inadequacies with scripting.
The problem is that I have copied that button over. I can't seem to figure out what wasn't translating over. I have a button named "ButtonOn" and is has all of the same properties as far as I can tell.
It's hard to say what's wrong without looking at the file. There are a number of things that need to be in place, including the scripts for both the "check box" button and its corresponding text field, the document-level JavaScript, and the hidden buttons that are the source of the icons. I'd be happy to take a look at your form if you're free to email it to me at: acroscript at gmail dot com
North America
Europe, Middle East and Africa
Asia Pacific