Hiding SharePoint:FormField in list forms
Views (77)
The easiest way to hide a SharePoint form field inside form is to wrap up it in inside XSl:IF condition,
In the below example, we are giving a condition which would always be true to hide the form field named Country in the form.
<xsl:if test=”1 = 2″>
<SharePoint:FormField runat=”server” id=”ff1{$Pos}” ControlMode=”New” FieldName=”Country” __designer:bind=”{ddwrt:DataBind(‘i’,concat(‘ff1′,$Pos),’Value’,’ValueChanged’,’ID’,ddwrt:EscapeDelims(string(”)),’@Country’)}” />
</xsl:if>
Select the Field within SharePoint designer, right click and select Conditional Formatting

And specify the show or hide condition in the Conditional Formatting dialog box

Hope it helps.
Filed under: SharePoint, SharePoint 2010 Tagged: SharePoint, SharePoint 2010
This was originally posted here.

Like
Report
*This post is locked for comments