3

I am facing this strange scenario inside my sharepoint 2013 online.

Now i want to create a new discussion list , but i want to hide the Question checkbox column. to do so i follow the recommended appraoch , to not apply any changes to the built-in CTs. so i follow these steps:-

  1. inside the site settings.
  2. i created a new site content type, and i chose the built-in Discussion CT, as its parent.
  3. then i tried to set the Question column as hidden inside the new CT.
  4. but seems the options was disabled. enter image description here
  5. so using SharePoint designer , i set the Question column as hidden inside the new CT.
  6. now i create a new Discussion list, and i add the new custom CT to the list, and then i remove the built-in Discussion CT from the list.
  7. so what i really did is that i should get the same discussion items, but without the question field included.
  8. but the problem is that when i try creating a new discussion item, i got only the body field as follow (where the subject field is not shown):-

enter image description here

so i am not sure what is going on ??

Thanks

4
+50

When you inherit Content Types, you should inherit as is. Otherwise you'll lose functionality of the default content type and breaks internal dependencies. That's the whole point of inheritance. Either you inherit and add (not remove) features, or you don't inherit at all.

There is a reason why site column properties are grayed out, and "solving" it with SharePoint Destroyer isn't a choise in this case.

In your case you would either have to build new custom site columns as well as a new folder content type that does not inherit from discussion. Another option is simply to use JavaScript or CSS to simply hide the Question boolean site column.

Enable Script

Running SharePoint Online Management Shell lets you easily enable scripting on your Site Collection immediately

Set-SPOsite <SiteURL> -DenyAddAndCustomizePages 0

Reference: Turn scripting capabilities on or off

  • now when i work with sharepoint on-primse , i use to add java-script to hide the Question columns,Setting" >> "Edit Page" >> "Insert Web Part" >> "Media and Content" >> "Script Editor" . but now i am using sharepoint online, and when i edit the page , i can not find the "Script Editor" web part,, seems inside sharepoint online i can not add scripts to create, edit and view forms !! alteast not from the UI,, so is there a reason for this ? – john Gu Nov 11 '16 at 14:25
  • 1
    You have to enable script on the tenant level in the Admin Center. – Benny Skogberg Nov 11 '16 at 14:28
  • as this is my first SP online,, so can you adivce on this more? i mean why it is disabled by default,,, and is there any drawback if i enable scripting ?? – john Gu Nov 11 '16 at 14:43
  • @johnG See my updated answer on how you enable scripting at site collection level – Benny Skogberg Nov 18 '16 at 12:37

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.