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

Select all or just one check boxes

Community Beginner ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

Hi,

I have a form that says:

Check all that apply

  • Hotel
  • Registration
  • Air Fare
  • Leave with Pay ONLY

Is it possible that if they choose the last one, the others are automatifcally unchecked?

Thanks.

TOPICS
PDF forms

Views

662

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

correct answers 1 Correct answer

Community Expert , Jun 17, 2022 Jun 17, 2022

Here's a primer on checkbox/radio buttons in Acrobat forms:

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

 

To uncheck all the others, you'll need a mouseUP script on the last checkbox. I'll assume the names of the other checkboxes are the same as the labels.

 

 

if(event.target.value != "Off"){
   this.getField("Hotel").value = "Off";
   this.getField("Registration").value = "Off";
   this.getField("Air Fare").value = "Off";
}

 

That should do it.

 

Votes

Translate

Translate
Adobe Employee ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

Hi Kathy

 

Hope you are doing well and sorry for the trouble.

 

The workflow that you are trying to achieve is possible using JavaScript. For more information about using JavaScript, please check the help pages below:

https://helpx.adobe.com/acrobat/using/applying-actions-scripts-pdfs.html

https://acrobatusers.com/tutorials/javascript_console/

 

Hope this information will help

 

Regards

Amal

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

Copy link to clipboard

Copied

Here's a primer on checkbox/radio buttons in Acrobat forms:

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

 

To uncheck all the others, you'll need a mouseUP script on the last checkbox. I'll assume the names of the other checkboxes are the same as the labels.

 

 

if(event.target.value != "Off"){
   this.getField("Hotel").value = "Off";
   this.getField("Registration").value = "Off";
   this.getField("Air Fare").value = "Off";
}

 

That should do it.

 

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 ,
Jun 22, 2022 Jun 22, 2022

Copy link to clipboard

Copied

LATEST

Thank you! This works just as I needed!

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