SharePoint 2016 Logo

Snippet to render Attachments Row in SharePoint 2010 Custom Edit Form

		<tr id="idAttachmentsRow">
			<td nowrap="true" valign="top" class="ms-formlabel" width="20%">
				<SharePoint:FieldLabel ControlMode="Edit" FieldName="Attachments" runat="server"/>
			</td>
			<td valign="top" class="ms-formbody" width="80%">
				<SharePoint:FormField runat="server" id="AttachmentsField" ControlMode="Edit" FieldName="Attachments" __designer:bind="{ddwrt:DataBind('u','AttachmentsField','Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Attachments')}"/>
				<script>
var elm = document.getElementById(&quot;idAttachmentsTable&quot;);
if (elm == null || elm.rows.length == 0)
document.getElementById(&quot;idAttachmentsRow&quot;).style.display=&apos;none&apos;;
</script>
			</td>
		</tr>