Skip to content

UHM-9493: fix 'Screen for syphilis' date field hidden when checked - #468

Merged
chibongho merged 1 commit into
masterfrom
UHM-9493
Aug 31, 2026
Merged

chibongho merged 1 commit into
masterfrom
UHM-9493

Conversation

@chibongho

Copy link
Copy Markdown
Contributor

openmrs/openmrs-module-htmlformentry/pull/349 made a fix to <obs style="checkbox" dateLabel="blah"> element to only show the date label and date field for the obs when the checkbox is checked. This conflicts with the custom setUpObsWithObsDateTime function here, which has its own logic to hide the date label and date field. This PR takes that stuff out, and only keeps the logic to limit the date field's maxDate to current date.

I confirmed that the setUpObsWithObsDateTime function is only in this repo, and is only used for the #syph-checkbox obs element.

Testing done:
In patient's visit dash, opened PMTCT-followup.xml form (in ENTER mode), which immediately saves. Reopen form in EDIT mode to verify that, when the checkbox is not checked, the date label and field are not shown:

image

After checking the box, entering a date and save, reopen and form and confirm that the date label and field are shown and populated with the entered value:
image

@mseaton mseaton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking your word for this

@chibongho
chibongho merged commit 835f965 into master Aug 31, 2026
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