1

I need to hide the '% Complete' and 'Task Status' columns from the edit form of a 2013 Workflow Task. Is there way to hide them or make them read only so the user cant change them??

columns that need to be hidden

I need to be able to keep the Approved and Rejected options for the user and when you toggle '% Complete' and 'Task Status' to hidden, it causes the buttons to disappear.

2

Add the code below into script editor web part into EditForm.aspx page in workflow task list to hide the '% Complete' and 'Task Status' columns.

<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
    $(".ms-standardheader:contains('% Complete')").closest("tr").hide();
    $(".ms-standardheader:contains('Task Status')").closest("tr").hide();
})
</script>

enter image description here

1

I believe you can hide them by changing the content type in the Library settings.

Go to Library Settings > Advanced Settings > Content Types

"Allow Management of content types." -> Yes

ContentTypes.Manage

A new section will appear in the library settings. Select your document/item/object of interest. In this case I'll edit a Document.

ContentTypes.List

You should see two columns that relate to the % Complete and Task Status. Go into each of them and set them to Hidden. Here I'm doing an example with the Title column.

Columns:

ContentTypes.Documents.Columns

Changing the setting to Hidden.

ContentTypes.Documents.Columns.Title

Now when you edit the document properties or item properties, the respective item is no longer shown.


Before:

Before

After:

After


EDIT

If you've got access to InfoPath you can change it with the button. Then select the sections to remove, and do a quick publish at the top left of the InfoPath Designer window. InfoPath Button

InfoPath Publish

Or you can use JavaScript with a "Script Editor" WebPart and put the following, or something similar to (depending on the classes for the sections):

<script type="text/javascript" src="//code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push( "removeObjects" );

function removeObjects(){
   $('.ms-formtable tr:contains("% Complete")').hide()
   $('.ms-formtable tr:contains("Task Status")').hide()
}

</script>
  • Doing this removes the Approved/Deny buttons from the page. Let me make a more specific edit to the question I posted. – MonkeyWithMachine Oct 9 '18 at 20:32
  • @MonkeyWithMachine Do you have access to InfoPath? And if you do, at the list dropdown do you have "Customize Form" with an InfoPath icon? See above comment for graphic. If so you can edit it that way by deleting it. Or you can edit the edit form with Javascript. Something I'll also include in the edited section. You may need to change the class I reference. (.ms-formtable may not be correct in your environment.) – KGlasier Oct 9 '18 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.