I'm building a form purely in SharePoint Designer and unfortunately don't have Infopath at my disposal (business requirement).
I have listed the attachments available on the form using the following:
<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>
Above this I'd like to mimic Infopath's attachments button which shows the dialog for users to quickly attach a file (clicking the ribbon isn't as obvious to the user). This button:
How would I go about doing this?