There are many instances where you would like to use your SharePoint attachment icon in the custom form itself and not in the ribbon.
Here are the steps given below to add the attachment field in the SharePoint custom form.
- Open the Custom Form (either it is edit or new item) in the SharePoint Designer 2010.
- Identify the place and paste the following code in SPD.
- <tr>
- <td rowspan="2" width="190px" valign="top" height="50px">
- <H3>
- Upload Evidence
- </H3>
- </td>
- <td valign="bottom" height="15" id="attachmentsOnClient">
- <span dir="ltr">
- <input type="file" name="fileupload0" id="onetidIOFile" size="56" title="Name" />
- </span>
- </td>
- </tr>
- <tr>
- <td colspan="4">
- <input id="attachOKbutton" type="BUTTON" onclick='OkAttach()' value="Upload" style="width: 12.8em; height: 2em"/>
- <span id="idSpace"/>
- </td>
- </tr>
- Thats it Folks. Now you can see the browse button to attach the documents to the custom form.