Skip to main content
Participant
March 6, 2020
Question

Acrobat Form: Java script to require a radio button choice when a check box is checked

  • March 6, 2020
  • 2 replies
  • 761 views

I have been asked to make an Acrobat DC form with a feature where if the user checks a certain check box, they would then be required to choose one out of two radio buttons. Is this possble? I don't know much about java script or coding. 

 

Thanks,

Debra

 

 

This topic has been closed for replies.

2 replies

JR Boulay
Community Expert
Community Expert
March 6, 2020

In this case I use to:

- turn the stroke of the radio-buttons to red when the checkbox is clicked,

- turn the stroke of the radio-buttons to transparent (or to the previous color) when a radio-button is clicked.

Acrobate du PDF, InDesigner et Photoshopographe
debravAuthor
Participant
March 6, 2020

Thank you for your reply. 

I don't think it answers my question but I'm not sure how else to word it. I do know how to make a choice required in the form , so that is not the problem.

In the form, one section has multiple options that the user can choose, none of which are required. But if the user chooses one particular option, then  I need the user to be required to choose one of two radio buttons following the specific choice.

For example, if the user checks a box named "Restriction" (which is not a required option) I then need to the user to be required to choose one of two radio buttons, named "Ship1" or "Ship2". Does that make sense?

What I think you are saying is that when the user checks the box (Restriction) then both radio buttons (Ship1 and Ship2)  turn red. But when a radio button is clicked, the color returns to its original color.  The red color would alert the user to the radio buttons, but does not make them required,  Is that what you are saying?

 

Thanks,

 

Debra

JR Boulay
Community Expert
Community Expert
March 7, 2020

Yes

Acrobate du PDF, InDesigner et Photoshopographe
try67
Community Expert
Community Expert
March 6, 2020

It's possible to set a field as required, but that is only validated when the file is submitted.

Is that what you mean?

debravAuthor
Participant
March 6, 2020

Thank you for your reply. I don't think it answers my question but I'm not sure how else to word it. I do know how to make a choice in the form required, so that is not the problem.

In the form, one section has multiple options that the user can choose, none of which are required. But if the user chooses one particular option, then  I need the user to be required to choose one of two radio buttons following the specific choice.

For example, if the user checks a box named "Restriction" (which is not a required option) I then need to the user to be required to choose one of two radio buttons, named "Ship1" or "Ship2". Does that make sense?

 

Thanks,

 

Debra

 

try67
Community Expert
Community Expert
March 6, 2020

You need to clearly define what you mean by "the user to be required to choose one of two radio buttons".

How is it enforced? What happens if they don't make a choice?