Sidebar hiding without remove image field

Hai everyone, How to remove Sidebar without skipping the image field in Frappe.Please help me with this

Hi @AAnjusha,

Which sidebar?

Can you explain? and please, share the image of the sidebar.

i want to hide this sidebar without the image field

Hi @AAnjusha,

Please apply the client/custom script.

frappe.ui.form.on('Your_DocType', {
	refresh(frm) {

Then reload and check it, please.

Thank You!


it’s working Thank you!!

is it possible to hide the sidebar based on user roles, if yes can you guide please. if no how can we hide from all doctypes i mean completely hiding it everywhere

thank you

Add if condition:

if (frappe.user.has_role('Sales User') == 1) {

and set it according to the requirement.

1 Like

Thank you