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.


@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; 

@saurabh6790 Thanks

@M_Tri_R you can see refer following article for dialog types.

1 Like