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:
- Create a Column in your Document Library
- 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.