Add an Attachment Field in SharePoint 2013 List Form

There are many instances where your customer would like to have Attach file option in the form itself instead of OOB option available in ribbon.Below I will show you how to have the “Browse” and “Upload” features directly on the form.

Open up SharePoint Designer 2013 and navigate to your list. Then click on the ASPX file you would like to edit under the “Forms” section.

In the code view of the form, place the below code to insert the Attachment Field
<tr>
<td rowspan=”2″ width=”200px” valign=”top” height=”25px”>
<b>Upload Files: </b> </td>
<td valign=”bottom” height=”25″ id=”attachmentsOnClient”>
<span dir=”ltr”>
<input type=”file” name=”fileupload0″ id=”onetidIOFile”
size=”60″ title=”Name”></input>
</span>
</td></tr>
<tr>
<td >
<input id=”attachOKbutton” type=”BUTTON” onclick=’OkAttach()’
value=”Upload” />
<span id=”idSpace”></span></td></tr>

Now you can see the browse button to upload the files into SharePoint list item.

1

Thanks. !! 🙂

3 thoughts on “Add an Attachment Field in SharePoint 2013 List Form

Leave a comment