How to freeze dialog box

How to freeze dialog box

Apply ice on it! :stuck_out_tongue_winking_eye:

Sorry, this is a morning joke here …

can you provide a little bit of information about what do you want exactly?

2 Likes

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 :rofl: :rofl:

1 Like

Hi @rk1214,

freeze dialog for refrence, please check it.

Thank You!

1 Like

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!

I want to freeze dialog box on click of image button

Please above script set then check.

It’s working on our side.
So again check it.

Thanks.