How to freeze dialog box
Apply ice on it!
Sorry, this is a morning joke here …
can you provide a little bit of information about what do you want exactly?
In dialog box custom button i am getting face recognition , they take some time to comparing the face when they start comparing i want to freeze the dialog box for that process
Trying Still Not Freeze
They freeze doctype not dialog box.
Ok @rk1214,
please apply and check it.
Demo Dialog:
let d = new frappe.ui.Dialog({
title: 'Enter details',
fields: [
{
label: 'First Name',
fieldname: 'first_name',
fieldtype: 'Data'
},
{
label: 'Last Name',
fieldname: 'last_name',
fieldtype: 'Data'
},
{
label: 'Age',
fieldname: 'age',
fieldtype: 'Int'
}
],
primary_action_label: 'Submit',
primary_action(values) {
// Please check in console.
console.log(values);
}
});
d.show();
Reload and check it, please.
Thank You!
I am create custom button field in dialog box and i want to freeze dialog box on that button click.
Please check it.
frappe.ui.form.on("Your DocType", "refresh", function(frm) {
frm.add_custom_button(__("Custom Button"), function() {
// When this button is clicked, do this
// set your function or value according to.
let d = new frappe.ui.Dialog({
title: 'Enter details',
fields: [
{
label: 'First Name',
fieldname: 'first_name',
fieldtype: 'Data'
},
{
label: 'Last Name',
fieldname: 'last_name',
fieldtype: 'Data'
},
{
label: 'Age',
fieldname: 'age',
fieldtype: 'Int'
}
],
primary_action_label: 'Submit',
primary_action(values) {
// Please check in console.
console.log(values);
}
});
d.show();
});
});
More details for:
Thank You!
Please above script set then check.
It’s working on our side.
So again check it.
Thanks.
if you want to freeze your screen
frappe.dom.freeze("<freeze message>")
unfreeze
frappe.dom.unfreeze()
Thank you so much.