When creating a form using PDFBox, when creating PDRadioButton or PDCheckBox, how do you create a label for each instance that toggles input on click?

Viewed 27

I have used many PDF forms where if you click on the label for a radio, it "checks" that radio button, if you click the label for a check box, it toggles the "checked" state of that check box. Is there anyway to create these using PDFBox?

<!-- I know how to do this in HTML -->
<input type="checkbox" name="example" id="example"/>
<label for="example">
  This is an example of a checkbox whose state
  can be changed by clicking on it's label
</label>
0 Answers
Related