Depends on field in Frappe Dialog

Can we set depends on field in Dialog?
Any example will help.

Also, based on another field, can we set property of field in Dialog, like mandatory, read-only?

Hi, So have you found out anything about this?
I found myself in need of this feature too.
Do you know where I can learn more about this Frappe Dialog? I found some code snippet using this,
but I want to know the full feature if possible.

Thankyou.

@kolate_sambhaji @M_Tri_R

In Frappe V7, you can toggle fields visibility for dialog with depends on.

To set properties to field,

var field = dialog.get_field("fieldname");
field.df.read_only = 1; 
field.df.reqd = true; 
field.refresh();
6 Likes

@saurabh6790 Thanks

@M_Tri_R you can see refer following article for dialog types.
https://frappe.github.io/frappe/user/en/guides/app-development/dialogs-types.html

1 Like