Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed radio/checkbox return values in getAllFieldsTypes() #383

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bogie
Copy link

@bogie bogie commented Feb 23, 2025

Previously field values were not properly returned in getFieldBase() for checkbox and radio buttons. the "value" return was either empty for checkboxes and in each radio button group you would get a return value for each radio button and no indication which one was checked.

Old output:

[
  { id: 'setting', type: 'radio', calc: false, value: 'inpatient' },
  { id: 'setting', type: 'radio', calc: false, value: 'outpatient' },
  { id: 'blinesr00', type: 'box', calc: false, value: '' },
  { id: 'blinesr01', type: 'box', calc: false, value: '' },
  { id: 'conanID', type: 'alpha', calc: false, value: '22' },
  { id: 'visitDate', type: 'date', calc: false, value: '23/02/2025' },
  { id: 'visitType', type: 'alpha', calc: true, value: 'baseline' }
]

Fixed output:

[
  { id: 'setting', type: 'radio', calc: false, value: 'inpatient' },
  { id: 'blinesr00', type: 'box', calc: false, value: false },
  { id: 'blinesr01', type: 'box', calc: false, value: true },
  { id: 'conanID', type: 'alpha', calc: false, value: '5' },
  { id: 'visitDate', type: 'date', calc: false, value: '22/02/2025' },
  { id: 'visitType', type: 'alpha', calc: true, value: 'baseline' }
]

Sample file PDF:

Created with libre office writer
commit.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant