Skip to main content
Participating Frequently
December 13, 2022
Answered

Make Checkboxes so that you can only check one out of the choices.

  • December 13, 2022
  • 2 replies
  • 2762 views

Hello, 

 

I am finishing up a project, and I have some questions that require only one answer, but currently all the checkboxes can be checked. 

I am wondering if someone can give me some help as to what mouse up code I need to use so that only one checkbox can be checked per question? '

I am guessing this can be achieved with a Mouse up code, but I am completely ignorant in Java. 

Thank you so much for your time. 

 

This topic has been closed for replies.
Correct answer Thom Parker

I would suggest you read the article and give my suggestion a try. See what happens.  

 

 

2 replies

AkanchhaS8194121
Legend
December 13, 2022

@David27492456emtk 

++adding on to what Thom has suggested. 

Here's a similar discussion for reference https://community.adobe.com/t5/acrobat-discussions/how-can-you-make-check-boxes-select-one-only/m-p/5282289/thread-id/16173#M16176 

This might help!

 

Thanks,

Akanchha 

Thom Parker
Community Expert
Community Expert
December 13, 2022

Read this article:

https://www.pdfscripting.com/public/Checkboxes-and-Radio-Buttons.cfm

 

The solution is to give all the fields the same name, but different export values. No JavaScript needed.

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participating Frequently
December 13, 2022

Will this prevent the other checkboxes being checked? Will they all show up as checked?

Participating Frequently
December 13, 2022

I would suggest you read the article and give my suggestion a try. See what happens.  

 

 


Sorry I ever doubted you Thom!

 

It works flawlessly!!!