Open Aleem92 opened 1 month ago
Thanks for catching the bug @Aleem92. Are you working on this ?
@Aleem92 Can you try adding entryMode extension at questionnaire top level and set code to prior-edit. This will enforce validation.
@Aleem92 Can you try adding entryMode extension at questionnaire top level and set code to prior-edit. This will enforce validation.
As mentioned above, I am already using the entryMode extension. You can refer to the sample questionnaire for reference.
Describe the bug In a paginated questionnaire where the first item on the first page is autofilled and the second item on this page fetches data from the database using a query, users can proceed from the first screen to the second screen without filling out all required fields on the first screen. This results in an error message appearing when submitting the form on the second screen.
Component SDC library
To Reproduce Steps to reproduce the behavior:
Expected behavior Display an error message to block users from proceeding to the next page if the current form is incomplete or incorrect.
Screenshots
Additional context The questionnaire has the following extension:
But it does not validate the required fields when the first item on the page has initial values and the second item fetches data from the database. In the sample questionnaire, there is an item with the link Id visit-date, which is a date type containing today's date as a value. The next item has the link Id medicine and is a reference type that fetches medicines from the database.
It has been observed that when the following extensions are removed from the item medicine, it does not move to the next page if the required fields are not filled, and it shows the validation errors.
Sample Questionnaire
Would you like to work on the issue? Yes