Skip to content

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

Merged
modesty merged 6 commits intomodesty:masterfrom
bogie:master
May 23, 2025
Merged

Fixed radio/checkbox return values in getAllFieldsTypes()#383
modesty merged 6 commits intomodesty:masterfrom
bogie:master

Conversation

@bogie
Copy link
Contributor

@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

@modesty modesty merged commit 93e6390 into modesty:master May 23, 2025
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.

2 participants