From a567365ea2f19356e353411706c432e08dec9598 Mon Sep 17 00:00:00 2001 From: Cosmin Date: Mon, 3 Jun 2024 17:48:14 -0400 Subject: [PATCH] RA-2037, update only the fields within the specified question (#139) --- omod/src/main/webapp/pages/registerPatient.gsp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omod/src/main/webapp/pages/registerPatient.gsp b/omod/src/main/webapp/pages/registerPatient.gsp index 7454b552..361ede1f 100644 --- a/omod/src/main/webapp/pages/registerPatient.gsp +++ b/omod/src/main/webapp/pages/registerPatient.gsp @@ -132,11 +132,12 @@ fieldset[id\$="-fieldset"] div > div { if (fieldProps && fieldProps.length == 3 ) { //section.question.field let fieldName = fieldProps[2]; - jq('input[name="' + fieldName + '"]').val(initialValues[field]); let questionName = fieldProps[1]; + jq('#' + questionName + ' input[name="' + fieldName + '"]').val(initialValues[field]); if (NavigatorController.getQuestionById(questionName) != undefined) { NavigatorController.getQuestionById(questionName).questionLi.addClass("done"); } + // when the relationships widget is configured to capture the mother info then the 'mother-field' will be present in the form if (fieldName == 'mother-field') { // otherwise the field's change() event that gets trigger automatically would clear the initial values which we just set above jq('#mother-field').autocomplete("option", "disabled", true);