Action on dialog filed

Hi,
how can i fir an event when clicked on a field in a dialog box?

@MaysaaSafadi you do that as this way

var d = new frappe.ui.Dialog({
    fields = [
        {'fieldname': 'simpledatafield', fieldtype: 'Data' }
   ]
});

d.show()
d.fields_dict.simpledatafield.refresh(); // enforce that the field have a input
d.fields_dict.simpledatafield.$input.on("click", function(event){
    // do something
});
3 Likes

thanx @max_morais_dmm

1 Like