4

I am trying to hide a simple calculated column from forms in a custom list. However, unlike WSS 3.0, I am not able to achieve this simple task. Any way I take to hide it, the option is disabled.

Steps to reproduce :

  • Create the column with a simple formula like ="test"
  • Allow Content Type modification
  • In Content Type Columns, try hiding the column, but the option is greyed out.

enter image description here

Tried :

  • Removing the column from any view
  • Create the column without adding it to content type/default and add the column to content type afterward
  • Use SharePoint Designer to modify the column (column is listed but disabled as well)

enter image description here

Am I missing something ?

I was able to remove it from the forms using JSOM, but it feels like killing a fly with a bazooka. Does anyone know why the option would be disabled in the user interface ?

  • The selected answer works but then the field resets to Optional again. Clicking the Push changes to site and lists does not seem to work. – E Towers Jul 6 '18 at 14:59
11
  1. Open SharePoint Designer.
  2. Open the website that contains your list with the calculated column.
  3. Click on "Lists and Libraries" in the left column (under Site Objects).
  4. On the right, click on the list that contains your calculated column.
  5. Under "Content Types", click on the content type where you want to hide the calculated column
  6. In the content type screen, click "Edit content type columns"
  7. In the column "Property", try clicking a few times on the "Optional" value until it changes into a dropdown list.
  8. Select "Hidden" from the dropdown list and click on push changes to sites and lists on ribbon.
  9. Finally Save your changes.

This worked for me long back. give it a try it should work for sure.

  • 1
    Thanks. Even if the column line is greyed, I was able the change the property. I had to click 2 times on it and wait for a second for the dropdown to appear. I assumed that greyed out = disabled, but it's not the case ! – JayHell Sep 23 '15 at 14:38
0

The column should have a boolean property called something like ShowFieldOnNewForm that you can set to no to hide it. Should be doable in SPD. If this doesn't work an alternative is to use HTML

  • Open SPD and take a copy of the NewForm.aspx
  • Edit the copy and delete everything in the WebPartPages:ListFormWebPart” tag, including the tag itself. This is the code that renders the form and is what we will be replacing. Make sure not to delete the ZoneTemplate tags.
  • Save the form and navigate back to the form in the browser. It should be blank
  • Back in SPD place the cursor in between the “ZoneTemplate” tag and insert a Custom List Form, from under the New Item Form. This will insert an HTML table with all the SharePoint controls relating to the columns above. You can simply comment out the Calculated Column settings. If you can't locate it, try searching the SharePoint:FormField or SharePoint:FieldDescription

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.