Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Community Beginner ,
Dec 13, 2022 Dec 13, 2022

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. 

David27492456emtk_0-1670957398491.png

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. 

 

TOPICS
How to , JavaScript , PDF forms
2.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
2 ACCEPTED SOLUTIONS
Community Expert ,
Dec 13, 2022 Dec 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 PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 13, 2022 Dec 13, 2022

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

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 13, 2022 Dec 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 PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 13, 2022 Dec 13, 2022

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 13, 2022 Dec 13, 2022

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

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 13, 2022 Dec 13, 2022
LATEST

Sorry I ever doubted you Thom!

 

It works flawlessly!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 13, 2022 Dec 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/... 

This might help!

 

Thanks,

Akanchha 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines