Hello Guys
I added a custom button and while clicking that a dialogue box displayed. after submitting data on the dialogue box the doc is updated and saved.
But I need to add a display depending on condition on the dialogue box fields and fetch the data automatically while selecting link fields.
This is my code but it is not work
frm.add_custom_button("Schesule Interview", () => {
let d = new frappe.ui.Dialog({
title: 'Enter Meeting Updates',
fields: [
{
label: 'Interview Type',
fieldname: 'interview_type',
fieldtype: 'Select',
options :'Direct \n Google Meet'
},
{
label: 'Location',
fieldname: 'location',
fieldtype: 'Link',
options :'Venue',
// 'depends_on': "eval:doc.interview_type===\"Direct\"",
},
{
label: 'Google Meet Link',
fieldname: 'meet_link',
fieldtype: 'Data',
//fetch_from:'location.address'
}
],
primary_action_label: 'Submit',
primary_action(values)
{
console.log(values);
// frm.set_value("meet_updates",values.requirements)
//frm.set_value("proposal",values.proposal)
//var child = cur_frm.add_child("summary_of_meeting");
//frappe.model.set_value(child.doctype, child.name, "contact_on",values.contact_on);
//frappe.model.set_value(child.doctype, child.name, "clients_requirement",values.requirements);
//frappe.model.set_value(child.doctype, child.name, "proposal",values.proposal);
//frappe.model.set_value(child.doctype, child.name, "summary",values.summary);
// cur_frm.refresh_field("summary_of_meeting");
//cur_frm.save();
d.hide();
}
});
d.show();
})
frm.change_custom_button_type('Schesule Interview', null, 'success');
Please help me with this
Thanks