Skip to content

Commit

Permalink
Only return field value for selected(checked) radio button
Browse files Browse the repository at this point in the history
  • Loading branch information
bogie committed Feb 23, 2025
1 parent a2ef586 commit 73e8dd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/pdffield.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ export default class PDFField {
page.Boxsets.forEach( boxsets => {
if (boxsets.boxes.length > 1) { //radio button
boxsets.boxes.forEach( box => {
retVal.push({ id: boxsets.id.Id, type: "radio", calc: isFieldReadOnly(box), value: box.id.Id, checked: box.checked });
if(box.checked)
retVal.push({ id: boxsets.id.Id, type: "radio", calc: isFieldReadOnly(box), value: box.id.Id });
});
}
else { //checkbox
Expand Down

0 comments on commit 73e8dd2

Please sign in to comment.