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

SDC | Bug: hidden field showing in validation required highlight #1760

Closed
parthfloyd opened this issue Dec 9, 2022 · 5 comments · Fixed by #1763
Closed

SDC | Bug: hidden field showing in validation required highlight #1760

parthfloyd opened this issue Dec 9, 2022 · 5 comments · Fixed by #1763
Assignees

Comments

@parthfloyd
Copy link
Collaborator

Describe the bug
Hidden fields are being shown in "Errors found" dialog on clicking submit button

Component
Core library, SDC library, reference app, or SDC gallery app

To Reproduce
Steps to reproduce the behavior:

  1. Go to This Repo: https://github.com/parthfloyd/android-fhir & open questionnaire in demo app. On hitting submit it will show the hidden question in "errors found" dialog"

Expected behavior
It should not show the error

Screenshots
hidden-error-screenshot

@jingtang10
Copy link
Collaborator

Thanks for raising this @parthfloyd. This is a legitimate issue.

The question itself is marked as required here:

https://github.com/parthfloyd/android-fhir/blob/c9dbe5b7eeca8db5073c146f130e73315f6044cc/demo/src/main/assets/new-patient-registration-paginated.json#L80

But according to the SDC IG, required only has meaning if the question is enabled by enable when

... Questionnaire.item.required only has meaning for elements that are conditionally enabled with enableWhen if the condition evaluates to true ...

https://build.fhir.org/questionnaire-definitions.html

So I think we do have to fix this one.

@jingtang10
Copy link
Collaborator

@parthfloyd please check out the draft PR I just linked

@jingtang10
Copy link
Collaborator

this PR is now ready for review.

@parthfloyd
Copy link
Collaborator Author

@jingtang10 Thanks a lot for this, I pulled the PR & tested. It's working with expected behaviour now!

@jingtang10
Copy link
Collaborator

@parthfloyd this is now merged

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 a pull request may close this issue.

2 participants