SIGN UP MEMBER LOGIN:    
ARTICLE

How to Enable Attachment Field in Custom Form in SharePoint

Posted by Destin joy Articles | SharePoint June 13, 2011
In this article I am showing a way to use the attachment option in a custom list form.
Reader Level:


If you use SharePoint Designer 2007 to add a Custom List Form Web Part SharePoint site, perhaps you noticed that while trying to attach a file by clicking Attach File in the custom form on the Web site you get the error message "This form was customized not working with attachment". In this article I am showing a way to use the attachment option in a custom list form.

Once you are done with the custom form with SharePoint Designer, in the XSL code block, locate the following code:

<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>



Find the tag as shown below:

AttaShare1.gif

Replace the lines of code that you located in step 2a with the following lines of code:

<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>

Once you have done that you will get the Attachment option:

AttaShare2.gif
 

Login to add your contents and source code to this article
share this article :
post comment
 

check this link http://support.microsoft.com/kb/953271

Posted by hasan siddiqui Mar 02, 2012

check this link http://support.microsoft.com/kb/953271

Posted by hasan siddiqui Mar 02, 2012

check this link http://support.microsoft.com/kb/953271

Posted by hasan siddiqui Mar 02, 2012

check this link http://support.microsoft.com/kb/953271

Posted by hasan siddiqui Mar 02, 2012

check this link http://support.microsoft.com/kb/953271

Posted by hasan siddiqui Mar 02, 2012
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Nevron Gauge for SharePoint
Become a Sponsor