hi guys i want to make a read only field after inputting a value…
1 Like
You can use something like
frappe.ui.form.on("Your_DocType", {
your_field_name: function(frm) {
if(frm.doc.your_field_name) {
frm.set_df_property("your_field_name", "read_only", 1);
}
}
});
how about on depends on the docfield itself do you have a code?
Can you elaborate on that ?
Depends on the docfield itself as in ?
what i mean is can i put that code for a read only on (depends on) on making a docfield what i mean is this.
That won’t be possible. Depends On is used to show/hide field based on a condition and it doesn’t change any other property of it.
You’ll have to use Custom Script to get the required functionality
Thank you sir for clarifying the code is working thank you so much.