Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 93919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:25:12+00:00 2026-05-10T23:25:12+00:00

I would like to display certain meta data fields in the edit form based

  • 0

I would like to display certain meta data fields in the edit form based on the value of a fields.

Example: Users upload a document to the Doclib to be approved by there manager. They are allowed to change the meta data Name,Case No, Location until the item is approved by the manager. Once the item is approved I would like to set Name and Case Number to read only.

What is the best way to meet this requirement?

If approved = yes set Name and Case No = Read only Else do nothing.


I have tried this method for about 5 hours. I believed this may be different for ModerationStatus. Might require something special

print('<xsl:choose> <xsl:when test='@_ModerationStatus != '0;#approved''>                <SharePoint:FormField runat='server' id='ff12{$Pos}' ControlMode='Edit' FieldName='Test_x0020_Session' __designer:bind='{ddwrt:DataBind('u',concat('ff12',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Test_x0020_Session')}'/> <SharePoint:FieldDescription runat='server' id='ff12description{$Pos}' FieldName='Test_x0020_Session' ControlMode='Edit'/>                       </xsl:when> <xsl:otherwise>      <xsl:value-of select='@Test_x0020_Session'></xsl:value-of> </xsl:otherwise> 

‘);

I can get it to work with the other fields but not ModerationStatus. I have also tried changing it to !=’0′ and !=’Approved’ and ‘0;#Approved’. Is there something I am doing wrong?

Seems like its stuck on 0;#Approved

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:25:13+00:00Added an answer on May 10, 2026 at 11:25 pm

    This can be easily solved with SharePoint Designer.

    • You will need to modify EditForm.aspx for your list
    • Hide the default ListFormWebPart (Do not delete it!)
    • Insert custom edit item form (more details…)

    Custom form will look exactly the same as the default one, but you will be able to customize it with SharePoint Designer. The code below can be used for default WSS Issues list. It will show Issue title as read-only when Issue Status = Closed.

    <xsl:choose>     <xsl:when test='@Status != 'Closed''>         <SharePoint:FormField runat='server' id='ff1{$Pos}' ControlMode='Edit' FieldName='Title' __designer:bind='{ddwrt:DataBind('u',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}'/>         <SharePoint:FieldDescription runat='server' id='ff1description{$Pos}' FieldName='Title' ControlMode='Edit'/>     </xsl:when>     <xsl:otherwise>         <xsl:value-of select='@Title'></xsl:value-of>     </xsl:otherwise> </xsl:choose> 

    You can apply the same logic for your custom lists or/and requirements.

    As usual, you might run to some additional problems. I was not able to get the value of @_ModerationStatus in Data View Web Part. I do not know the exact reason…

    Here is a simple workaround:

    1. Create a Column in your Document Library
    2. Create a new in workflow SharePoint Designer.

    It should fire when item is changed and copy the value of approval status to newly created column.

    You can use the custom column for conditional formatting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 76k
  • Answers 76k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Check out Big-O for Eight Year Olds? May 11, 2026 at 3:07 pm
  • added an answer Assuming that your model relationships are set up correctly*, it's… May 11, 2026 at 3:07 pm
  • added an answer You would need to use javascript to tell the server… May 11, 2026 at 3:07 pm

Related Questions

I will first describe the problem and then what I currently look at, in
I'm building a website for a friends's art exhibition. I currently define a model
I have the following data structure (a list of lists) [ ['4', '21', '1',
I would like to know the best way to delete records from a live

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.