Select all or just one check boxes

New Here ,
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

84

Likes

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

Adobe Community Professional , 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.

Likes

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

Likes

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
Adobe Community Professional ,
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

Likes

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!

Likes

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