Which is more appropriate to use frappe.ui.Dialog or frappe.prompt?

Hello,

I have going through a few post in this forums and I observed that in some post a developer is using frappe.ui.Dialog and in some frappe.prompt.

In my case I need to show two fields as Read only with preloaded values and one field in which the has user to enter value.

Which should I use frappe.ui.Dialog or frappe.prompt?

TIA

Yogi Yang

frappe.prompt is just a wrapper around lower level API of Dialog, for simple usage just use prompt.

1 Like

With frappe.prompt you cannot prevent the dialog from closing on validations errors.
Just use Dialog.