Health Care Consultation Customization

Dears

in erpnext health care module

in consultation

there is a text filed symptoms
which get its information
from the upper select filed Complaints

my question is:
for exaple if i have a fourm
and have tow fields

Field1 type select which selsct values , for example A- B- C -D
Filed 2 type text which get its info from the Filed1 data
How to let filed2 get its info and added it to its filed

so if i select A at filed1 it will added it To filed2
and when selsct B at filed1 it will add B at filed2

so now Filed 2 contain
A
B

any help or guide to start with brothers

Add a custom script for your doctype, will be somthing like

frappe.ui.form.on('My Doctype', {
    field1 : function(frm){
         let new_val = frm.doc.field2 + "\n" + frm.doc.field1;
         frm.set_value("field2", new_val);
    }
});

1 Like

many thanks vijaywm
it works