Is there a way to trigger change in dialog box fields? Like what doctype fields do.
you can achieve this with - onchange
event.
e.g.
var dialog = new frappe.ui.Dialog({
title: __("Customer Details"),
fields: [{
fieldtype: "Link",
fieldname: "customer",
label: __("Customer"),
options: "Customer",
reqd: 1,
onchange: function(e) {
console.log("Selected Customer: ", this.value)
}
}]
})
dialog.show()
4 Likes
cool! Thanks let me try
1 Like