Add Attachment Field in SharePoint 2013 List Form

If your customer don’t want to use SharePoint OOB option available in ribbon. And if want to Attach a file in List Forms itself to save extra clicks and if he don’t want to navigate to a different page to upload items.

Solution:
Create a custom list form using SharePoint Designer. Add Attachment Field in SharePoint 2013 List Form. Place the below code where you would like to insert the Attachment Field. I have added this code at the end of the form.

<tr>
  <td colspan="2">
   <table>
    <tr>
     <td width="190px" valign="top" class="ms-formlabel">
       <H3 class="ms-standardheader">
         <nobr>Attachments</nobr>
       </H3>
     </td>
     <td width="400px" valign="top" class="ms-formbody" id="attachmentsOnClient">
       <input type="file" name="fileupload0"  id="onetidIOFile" size="50" title="Name"></input>
     </td>
     <td>
       <input name="attachButton" type="button" value="Attach" onclick='OkAttach()' />
     </td>
    </tr>
   </table>
  </td>
</tr>
Output looks pretty cool:
Add Attachment Field in SharePoint 2013 List Form
SHARE

Sudheer Gangumolu

I'm a Software Analyst / Developer / Blogger, having good experience in working with different flavors & Customization of SharePoint (i.e.,SP O365 / 2013 / 2010 / 2007) and .Net Apps. Currently, working on SharePoint 2013 / SharePoint O365. Guiding people on my technologies.

    Blogger Comment
    Facebook Comment

1 comments :

  1. Good article about sharepoint list form with useful coding. Its really working well.
    sharepoint solution providers

    ReplyDelete