Multiple choice checkboxes in PDF forms

Ask a Question related to Adobe Acrobat Windows, Design and Development.

  1. #1

    Default Multiple choice checkboxes in PDF forms

    Hi,

    I tried searching on this and couldn't find anything!

    I want to be able to add a checkbox with 3 states, (blank, ticked and crossed).

    I'm using Acrobat 5, please let me know if this is something that can be done in Acrobat 6 but not in 5.
    reamer@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. CourseBuilder: Multiple Choice tests
      :confused; I am a novice to Coursebuilder. I am building an instructional website in Dreamweaver for my Masters Project. For my testing I want...
    2. Multiple choice question with drop-down box
      Has anyone created a multiple choice interaction with coursebuilder that uses a drop-down box to list the answers? Once the answer is selected, then...
    3. FLASH multiple choice quiz
      I know this is late in the day but answer to to use the right click copy and paste on your mouse.
    4. Multiple choice menu?
      Hi, what feature am I looking for when I need to get user input for selecting any combination of 12 values? The FMP6 solution will be a single...
    5. OT: grading multiple choice
      I have to grade 200 multiple choice exams, and rather than reinventing the wheel, I figured it'd be best to quickly ask: does anyone have a tool to...
  3. #2

    Default Re: Multiple choice checkboxes in PDF forms

    Sorry i should add that they all need to be the same box.

    I have space constraints and so it needs to be 1 small box with 3 alternative states.

    I've tried a combo box but the arrow to open the menu obscures the choice made.

    Thanks
    reamer@adobeforums.com Guest

  4. #3

    Default Re: Multiple choice checkboxes in PDF forms

    No, not with a check box. But it's possible to hack up a button/text field combination to emulate a > 2 state control. It involves a small amount of JavaScript. Let me know if you'd like a sample...(now where is that...)

    I've tried a combo box but the arrow to open the menu obscures the choice
    made




    That may just be a problem at certain magnifications. As one zooms in, it often is not a problem. Can't you just make the combobox a little wider?

    George
    George_Johnson@adobeforums.com Guest

  5. #4

    Default Re: Multiple choice checkboxes in PDF forms

    George does that "hack" allow you to replace the x with "Y" or "YES"?
    Larry_Tilley@adobeforums.com Guest

  6. #5

    Default Re: Multiple choice checkboxes in PDF forms



    does that "hack" allow you to replace the x with "Y" or "YES"?




    Yes. One of the big advantages of this approach is it uses a button, which can have any appearance you want.

    George
    George_Johnson@adobeforums.com Guest

  7. #6

    Default Re: Multiple choice checkboxes in PDF forms

    So, would you care to share the information. I have an HR department that would rather see YES or NO displayed rather than placing a check by the word.

    Larry
    Larry_Tilley@adobeforums.com Guest

  8. #7

    Default Re: Multiple choice checkboxes in PDF forms

    Sure, but I won't be able to post it until later today.

    George
    George_Johnson@adobeforums.com Guest

  9. #8

    Default Re: Multiple choice checkboxes in PDF forms

    Here's the demo: <http://www.peakforms.com/pdfs/multistate.pdf>

    You'll have to study the JavaScript to see how it works. There is some document-level code (in the 'init' JavaScript) and calls to it in the button's Mouse Up event and the text field's Validate event.

    There are two types of fields. The traffic light field gets its icon changed with each click of the button, and the other button gets its face text and text color changed with each click.

    It might be better to use document-level icons, as opposed to the (normally) hidden buttons as the source of the icons, but the approach the demo uses is a bit easier to set up and understand. Post again if you have any questios.

    George
    George_Johnson@adobeforums.com Guest

  10. #9

    Default Re: Multiple choice checkboxes in PDF forms

    hi george,

    thanks a lot for the help!
    >I've tried a combo box but the arrow to open the menu obscures the >>choice
    made





    That may just be a problem at certain magnifications. As one zooms >in,
    it often is not a problem. Can't you just make the combobox a >little
    wider?




    afraid not. i have size constraints, the boxes are boxed in either side by more boxes and this can't be changed!

    have another question before i go off and try to make this work.

    the PDF document i am creating has many, many of these multistate checkboxes. Is that going to be a problem? Is there any naming convention i should use?

    thanks again.
    reamer@adobeforums.com Guest

  11. #10

    Default Re: Multiple choice checkboxes in PDF forms

    I could not reproduce this effect in another document (i tried using one, then the other example contained in the demo).

    I found the document javascript init but pasting that in the new pdf didn't help.
    reamer@adobeforums.com Guest

  12. #11

    Default Re: Multiple choice checkboxes in PDF forms

    Thank you. I believe it will take care of my needs.

    Larry
    Larry_Tilley@adobeforums.com Guest

  13. #12

    Default Re: Multiple choice checkboxes in PDF forms

    thanks george, i worked it out now.

    for anyone who needs to know how to reproduce the tri-state button in this demo (this is for the button/text not traffic lights)[url]http://www.peakforms.com/pdfs/multistate.pdf[/url] <http://www.peakforms.com/pdfs/multistate.pdf>:

    You need to open the tools menu, Tools/Javasript/Document Javascripts
    -then edit the 'init' javascript. copy the whole script.

    Edit the properties of the button box (button3), on the ACTIONS tab. It has a javasript on the MOUSE UP action: setNextButtonVal("text3", aButtonText); [text3 is the name of the text box]. Copy this down

    Edit the properties of the text box (text3), on the VALIDATE tab. It has a CUSTOM VALIDATE script: setNewButtonText("button3", aButtonText, event.value); [button3 is the name of the button box]

    Open the document you would like to add the button to, open the tools menu again - Tools/Javasript/Document Javascripts. Then write 'init' in the box and add it. Then paste the 'init' script in.

    create a button and add the JS to the MOUSE UP state. make sure the it contains the correct name of the textbox.

    create a textbox and add the JS to the custom validate script. make sure the it contains the correct name of the button.

    To add more than one of these buttons to a PDF, just change the names of the boxes and in the scripts accordingly.

    Change the text and colours in the 'init' script.
    reamer@adobeforums.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139