Skip navigation
Currently Being Moderated

Circling items instead of using check boxes or radio buttons

May 30, 2012 11:48 AM

Tags: #javascript #buttons #check_boxes #circle_items #custom_javascript

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.

 
Replies
  • George Johnson
    9,213 posts
    Aug 11, 2002
    Currently Being Moderated
    May 30, 2012 12:31 PM   in reply to PFautley

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    May 30, 2012 12:36 PM   in reply to PFautley

    Is it "ButtonOn" or "buttonOn"?

     

    Javascript is case-sensitive.

     
    |
    Mark as:
  • George Johnson
    9,213 posts
    Aug 11, 2002
    Currently Being Moderated
    May 30, 2012 12:53 PM   in reply to PFautley

    Clear the console by clicking the little trashcan icon in the lower-right and try again. Report the exact error message and the exact name of the button.

     
    |
    Mark as:
  • George Johnson
    9,213 posts
    Aug 11, 2002
    Currently Being Moderated
    May 30, 2012 1:01 PM   in reply to PFautley

    Is button0 set up with a layout other than "Label only"? It would normally be set up so that it's set to "Icon only".

     
    |
    Mark as:
  • George Johnson
    9,213 posts
    Aug 11, 2002
    Currently Being Moderated
    May 30, 2012 1:16 PM   in reply to PFautley

    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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points