web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Nishant Rana’s Weblog / Hiding SharePoint:FormField...

Hiding SharePoint:FormField in list forms

Nishant Rana Profile Picture Nishant Rana 11,325 Microsoft Employee

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.

Comments

*This post is locked for comments