I am trying to convert the Systolic field to be a mandatory field. The purpose is that if the user inserts Diastolic data, he/she must insert also the Systolic data (I want to prevent sending only one entry). I managed to disable the Systolic field as per the code below. But now I want to follow one of the two scenarios:
Bahmni.ConceptSet.FormConditions.rules = {
'Diastolic Data' : function (formName, formFieldValues) {
var systolic = formFieldValues['Systolic'];
var diastolic = formFieldValues['Diastolic'];
if (diastolic) {
return {
enable: ["Systolic Data"]
}
} else {
return {
disable: ["Systolic Data"]
}
}
}
-
Make Systolic field mandatory field (I don’t know where I can do that) or
-
Once I enable Systolic Data I want to automatically make it mandatory (I also don’t know how to achieve this even though I’ve tried)
Any idea where or how I can do any of the two options?