SharePoint 2016 Logo

If you want to customize a NewForm for SharePoint list so, that users can add attachements in the same interface as other form fields, you should place control for adding attachments to a form. The problem is that this is not described and you really have to rewrite already half-prepared control.

This snippet below will help you to save some time for this task.

<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()'  class="ms-ButtonHeightWidth" />
</td>
</tr>