dimanche 24 juillet 2022

Trying to have a checkbox automatically check 2 other checkboxes

I'm very new to coding in java... So I apologize for the seemingly simple question.

However, In an Adobe PDF Form, I have a list of seven checkboxes, and when I select checkbox 2,3,or 4 I would like two other checkboxes to either be highlighted or selected.

So if Box B "r2w_att_B" is checked then "r2w_min_cond1" and "r2w_min_cond2" should both be checked. and if the form filler decides to check those boxes before selecting B,C or D then nothing should change. basically it is to ensure that you can't select B,C or D and "forget" to select the 2 minimum conditions.

and the same would be true for box C and D, so in theory the code should be the same with the exception of name of the initial box, I've used this line from another part of the form and it worked. so I could use that again. [if (event.target.value == "Yes")]

I have no idea how to write this... and the other code snippets I came across, I don't quite understand and cant make them work. I did piece together a clip of functional code, that on "mouse up" a checkbox triggers a textbox to copy "value" to another text box.

I appreciate anyone and everyone's guidance as I start learning a Java




Aucun commentaire:

Enregistrer un commentaire