4

I want to add Attachment File Button (like attachment in email / Browse button before upload something file) in Library Form Sharepoint 2013. So, when I fill that form, I could attach some files.

  • 1
    by Library form you mean NewForm.aspx of a document library? – Zakir HC Mar 16 '16 at 9:30
  • the newform for any document library already has an attach file button, what exactly are you looking for? are you using a custom form for uploading documents to library? – Zakir HC Mar 16 '16 at 12:15
  • Hi Mr Zakir HC, Yes, I want using custom form in Library SharePoint 2013. In Library standart SP 2013, we can upload a file/document. But in my case, I want to have a column/field in Library Form which that column could attach another file/document. So, List :: Create Item -> Fill some fields and can attach file/document. Library :: Create Document / Upload Document -> Fill some fields and *could attach another file/document too. Thank you. Best Regards, Galih – galih Mar 17 '16 at 4:11
2

This link might be able to help you.

 <script type="text/javascript">
function AttachFile()
{
    SP.Ribbon.PageManager.get_instance().executeRootCommand("Ribbon.ListForm.Edit.Actions.AttachFile", null, null, null);
}
</script>
<a onclick='javascript:AttachFile();'>browse</a>

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/31a8cf62-db68-4fb8-8c15-3748c67eb989/add-attachment-button-to-a-custom-new-form-sharepoint-2013?forum=sharepointdevelopment

  • it works, but I had to rename AttachFile() function because there is another system function with this name. Perfect! anyway – netadictos Mar 15 at 9:18
0

You can use Info Path to attached a file in the form and you can easily put attachment field where you want in the form. For more info see this: https://support.office.com/en-us/article/Insert-a-file-attachment-control-8e8e102f-fad5-4440-bc28-d28944f85287

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.