Skip to main content
Participant
March 4, 2024
Answered

Conditional Format Check Box / Radio Buttons

  • March 4, 2024
  • 1 reply
  • 1006 views

Hi 🙂

 

I'm creating a PDF and want to use conditional formatting to make a specific check box (titled SCR) required if a certain radio box (titled STP and Grouped in EXT) is selected. Is this possible?

I also have a section that has 6 radio buttons (can be changed to check boxes if necessary). Is it possible to make at least 1 (can be more but needs at least 1) of the buttons/boxes required if the radio box (titled EVT Grouped in EXT) is selected?

 

Thanks so much for any help!! 

This topic has been closed for replies.
Correct answer try67

- Yes. Create a (hidden) text field with the following calculation script:

this.getField("SCR").required = this.getField("EXT").valueAsString=="STP";

- You can't make just one field in a group (whether it's a group of radio-buttons or check-boxes) required, and not the rest. Nor is it possible to tick more than one item in a group. But you can make the whole group required, using the same type of code as give above. Just duplicate it (under the same field's calculation) with the new field name and condition.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 4, 2024

- Yes. Create a (hidden) text field with the following calculation script:

this.getField("SCR").required = this.getField("EXT").valueAsString=="STP";

- You can't make just one field in a group (whether it's a group of radio-buttons or check-boxes) required, and not the rest. Nor is it possible to tick more than one item in a group. But you can make the whole group required, using the same type of code as give above. Just duplicate it (under the same field's calculation) with the new field name and condition.

Participant
March 6, 2024

Thank you so much for your help, the script provided worked perfectly!

I currently have a group of 6 radio buttons, which I have set up to be required when a specific Text box is used.

Is there a way I could set up basically the same thing with check boxes, so that at least 1 is required, but more than 1  can be selected?

 

Sorry for being a pain! I know how to do very basic things in Adobe, but this goes beyond my scope of Adobe knowledge lol

Thanks again!!

try67
Community Expert
Community Expert
March 6, 2024

It's possible, but more complicated. To do that you can't have them be named the same. They will have to be uniquely named, and then a script will have to check the group and see if one (or more) fields are ticked.