Hi Everyone,
Is there any way that we can hide the “Attach File+” from a document.
Regards
Ruchin Sharma
Hi Everyone,
Is there any way that we can hide the “Attach File+” from a document.
Regards
Ruchin Sharma
Go to Setup->Customize Form. From “Enter Form Type” select the document from which you want to delete Attach. From “fields” select that particular field, click on remove and update.
From where you want to delete this?
As it get displayed on every form but I want to hide this button from a specific form on a specific condition.
Regards
Ruchin Sharma
@ruchin78 this is a system wide feature not only module or form customized…
but you can find a way to add style in developer section to do:
.form-attachments { display:none;}
@ramielian
Thanks for your reply.
but you can find a way to add style in developer section to do:
What does that mean?
Regards
Ruchin Sharma
@ruchin78 i mean you can do this by adding css from the developer section in the erp…
or you can edit master files and add the css…
@shahmunjal Try this code:
frappe.ui.form.on("Traget DocTypet", {
refresh:function(frm) {
$('.form-attachments').hide();
}
});
@Mohammed_Redha: Thanks for your help… it works. But can you tell me how can we restrict user to upload specific file type (*.pdf, *.doc) only ?
@Mohammed_Redha @erpnext_developer
Pls. help if we can restrict the user to upload specific file types only?
Could you please show the directory / path where the above CSS code should be placed to remove Attach File +?
Hello,
Put it in the corresponding DocType script. (e.g. for Sales Invoice
, go to the directory put it on sales_invoice.js
)
Regards,
Ivan
Thank You Ivan!
It’s working.