Skip to content

Commit

Permalink
RA-2037, update only the fields within the specified question (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
cioan authored Jun 3, 2024
1 parent 9a53ef9 commit a567365
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion omod/src/main/webapp/pages/registerPatient.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a567365

Please sign in to comment.