Hiding SharePoint:FormField in list forms

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’)}” />


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.


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

Please share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.