I'm creating a new custom form using SharePoint Designer 2013.
I would like to add a attachment button to be able to upload files and images. How can this be done?
This is what im adding to my new custom new form:
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<h3 class="ms-standardheader">
<nobr>Attach Files</nobr>
</h3>
</td>
<td valign="top" class="ms-formbody" id="attachmentsOnClient" style="width: 434px">
<span dir="ltr">
<input type="file" name="fileupload0" id="onetidIOFile" size="56" title="Name"></input>
</span>
</td>
<td width="100px" valign="top" class="ms-formbody">
<input name="Button1" type="button" value="Attach" onclick='OkAttach()' style="width: 6em;
height: 1.7em" id="attachOKbutton" />
<span id="idSpace"></span>
</td>
</tr>
<tr id="idAttachmentsRow">
<td nowrap="true" valign="top" class="ms-formlabel" width="20%">
<SharePoint:FieldLabel ControlMode="New" FieldName="Attachments" runat="server"/>
</td>
<td valign="top" class="ms-formbody" width="80%">
<SharePoint:FormField runat="server" id="AttachmentsField" ControlMode="New" FieldName="Attachments" __designer:bind="{ddwrt:DataBind('i','AttachmentsField','Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Attachments')}"/>
<script>
var elm = document.getElementById("idAttachmentsTable");
if (elm == null || elm.rows.length == 0)
document.getElementById("idAttachmentsRow").style.display='none';
</script>
</td>
</tr>