my code goes like this.
frappe.ui.form.on(‘Patient’, {
refresh: function(frm) {
frm.add_custom_button(('Action 1'), function(){
patient_name.defaults() = 'Name1'
}, __("action"));
frm.add_custom_button(('Action 2'), function(){
patient_name.defaults() = 'Name2'
}, __("action"));
}
});
Is it possible to autofill a textfield? or any suggestions, please?