The title of this post is an alert pop up, when we used a customized new/edit form then want add some attachments.
So for you that want to create customized form that include that attachment function, you should add some codes to make it works.
1. Find this codes:
<xsl:template name=”dvt_1″>
<xsl:variable name=”dvt_StyleName”>ListForm</xsl:variable>
<xsl:variable name=”Rows” select=”/dsQueryResponse/Rows/Row”/>
<table border=”0″ width=”100%”>
<xsl:call-template name=”dvt_1.body”>
<xsl:with-param name=”Rows” select=”$Rows”/>
</xsl:call-template>
</table>
</xsl:template>
2. Append with this codes
<xsl:template name=”dvt_1″>
<xsl:variable name=”dvt_StyleName”>ListForm</xsl:variable>
<xsl:variable name=”Rows” select=”/dsQueryResponse/Rows/Row”/>
<div>
<span id=”part1″>
<table border=”0″ width=”100%”>
<xsl:call-template name=”dvt_1.body”>
<xsl:with-param name=”Rows” select=”$Rows”/>
</xsl:call-template>
</table>
</span>
<SharePoint:AttachmentUpload runat=”server” ControlMode=”Edit“/>
<SharePoint:ItemHiddenVersion runat=”server” ControlMode=”Edit“/>
</div>
</xsl:template>
note : change the red color with New if you used for New Page Form,
or Edit if you used for Edit Page Form
3. Locate this following code
<xsl:if test=”$dvt_1_automode = ’1′” ddwrt:cf_ignore=”1″
4. Add this following code above the code of point #3
<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(“idAttachmentsTable”);
if (elm == null || elm.rows.length == 0)
document.getElementById(“idAttachmentsRow”).style.display=’none’;
</script> </td>
</tr>
note :* change the red color with New if you used for New Page Form, or Edit if you used for Edit Page Form
* find __designer:bind=”{ddwrt:DataBind(‘u‘ …. and change to ‘i’ for New Page Form or ‘u’ for Edit Page Form
Source : http://support.microsoft.com/default.aspx?scid=kb;en-us;953271&sd=rss&spid=11373