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

How can you make check boxes select one only?

Community Beginner ,
Jul 09, 2013 Jul 09, 2013

Copy link to clipboard

Copied

I am working on locking down a registration form. There are a couple sections that have multiple checkboxes but ONLY one can be marked. We won't even accept the form if there is more than one option marked. Most sections there are two boxes, check one but not the other. There is one section though that has 16 boxes, and yes only one can be marked.  Can I do that?

Similarly I also need to do the same thing with two text fields, only one should be filled out.

THANKS!

TOPICS
PDF forms

Views

173.1K

Translate

Translate

Report

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 ,
Feb 26, 2018 Feb 26, 2018

Copy link to clipboard

Copied

You can use something like this as the field's custom validation script:

this.getField("Other field name").readonly = (event.value!="");

View solution in original post

Votes

Translate

Translate

Report

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 ,
Jan 22, 2019 Jan 22, 2019

Copy link to clipboard

Copied

1)  Give all the check boxes the same name. 

2)  Make the export value (on the Options tab of the properties dialog) different for each.

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

View solution in original post

Votes

Translate

Translate

Report

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
New Here ,
May 21, 2018 May 21, 2018

Copy link to clipboard

Copied

DW! I found how to set different export values

Properties > Options > Export Values

Votes

Translate

Translate

Report

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
New Here ,
Mar 10, 2020 Mar 10, 2020

Copy link to clipboard

Copied

Hi All, I see where I can change the export value in options, but it's not working for me. I have a ton of check boxes, but in groups. For example the first group of checkboxes are Emergency, Urgent, Priority, so I renamed each box "priority", then changed the export value from on to off. It didn't work; what am I missing? Thanks in advance for your help. 

Votes

Translate

Translate

Report

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
New Here ,
May 06, 2020 May 06, 2020

Copy link to clipboard

Copied

Hi Lslozada, old post - but very useful.  Read Thom_Parker's response closely (I like his KISS method):

1)  Give all the check boxes the same name. 

2)  Make the export value (on the Options tab of the properties dialog) different for each.

It sounds like your issue may be setting a *different* export value for each. Since you have a ton of check boxes, it sounds like each group (if only one value is desired) should have the same Name for those checkboxes and then a different export value for each of those in that group. Example: Group 1, checkboxes all named 1EUP, Export Values: 1st Checkbox=1, 2nd Checkbox=2, 3rd Checkbox=3, 4th Checkbox=4, etc. / Group 2, checkboxes all named 2EUP, Export Values: 1st Checkbox=1, 2nd Checkbox=2, 3rd Checkbox=3, 4th Checkbox=4, etc.

I hope this helps!

Votes

Translate

Translate

Report

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 ,
May 06, 2020 May 06, 2020

Copy link to clipboard

Copied

You'll find the answers here:

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

 

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

Votes

Translate

Translate

Report

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
New Here ,
Aug 17, 2022 Aug 17, 2022

Copy link to clipboard

Copied

Ok, I'm VERY lost. I'm trying to make a series of check boxes in a group. Yes/No, check ONE for each line. What keeps happening is if you check one, the whole column (all the "no" or all the "yes") check, and I can't seem to make it so you can check one from EACH row (yes or no) and have just that one mark with the check. HELP????

Votes

Translate

Translate

Report

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 ,
Aug 17, 2022 Aug 17, 2022

Copy link to clipboard

Copied

Use unique names for the checkboxes.

Votes

Translate

Translate

Report

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 ,
Aug 18, 2022 Aug 18, 2022

Copy link to clipboard

Copied

Read this article. It covers everything you need to know about radio buttons and checkboxes. 

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

 

 

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

Votes

Translate

Translate

Report

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
New Here ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

I'm not able to uncheck the box again like other regular checkboxes that don't have the check one option. Do you guys have a solution to this?

Votes

Translate

Translate

Report

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 ,
Aug 14, 2019 Aug 14, 2019

Copy link to clipboard

Copied

Then it's most likely a radio-button, not a check-box.

Votes

Translate

Translate

Report

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 ,
Aug 12, 2021 Aug 12, 2021

Copy link to clipboard

Copied

The original answer for this has disappeared. How can you make sure just one checkbox is clicked? I can't find information about this anywhere else. 

Votes

Translate

Translate

Report

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 ,
Aug 12, 2021 Aug 12, 2021

Copy link to clipboard

Copied

This question is so popular that it has two pages. You'll find all the previous posts on the first page.  Look at the bottom of this web page, you'll see the page controls, "Previous", "1", "2", and "Next".

 

However, it would probably be very helpful for you to read this article.

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

 

The technique is very simple if you want just one checkbox to be active at a time. But if you want some fancy combination, such as allowing any 3 checkboxes in a group, then a script is required.

 

 

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

Votes

Translate

Translate

Report

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
New Here ,
Jan 17, 2023 Jan 17, 2023

Copy link to clipboard

Copied

Hi! 

 

Is there any way of doing this already in InDesign?

Votes

Translate

Translate

Report

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 ,
Jan 17, 2023 Jan 17, 2023

Copy link to clipboard

Copied

There are a number of issues covered in this thread. Which one do you want to do in InDesign?  

But just as a general rule, I don't think you can enter a PDF script in InDesign.  So any scripted solution would need to be entered in Acrobat. 

 

 

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

Votes

Translate

Translate

Report

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
New Here ,
Jan 17, 2023 Jan 17, 2023

Copy link to clipboard

Copied

Ok, thanks! I was referring to the original question about the check boxes. I'm designing the forms in Indesing and was wondering if there is a way to do this in the "buttons and forms" menu. But apparently not. I'll make the changes in Acrobat afterwards. 

Votes

Translate

Translate

Report

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
New Here ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

LATEST

Did you try using the Radio Button?

 

The Radio Button will make it a Choice. Where they must pick one of the options. 

Very Simple and no writing code. 

Votes

Translate

Translate

Report

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