2

While creating columns in content type the option of Require that this column contains information is disabled so I cannot make the column required. But once I save the column and edit it I am able to make it required. It results in two steps for me and is kind of drag on productivity.

If there any setting via which I can make the option Require that this column contains information enabled while creation of column itself?

Update 22-Nov-2013:

I noticed that the option of Require that this column contains information is disabled only when adding column to content type. If I add a column to a custom list then this option is enabled. I tried on SharePoint 2013 and 2010.

1
  • Open your list in SharePoint Designer and then edit columns and then uncheck "Allow blank values"
    – user88970
    Commented Feb 11, 2020 at 16:03

1 Answer 1

1

If you look at the page that is used to create a new column, FldNew.aspx, which is located for SharePoint 2010 in the 14\TEMPLATE\LAYOUTS folder you can find the following variable

bool   bRequired = false;

Changing this to true will set the default for required. However changing this page is not advised because Microsoft can at any time changed this page and you will loose youre new default setting.

You could create youre own application page wich is identical to the FldNew.aspx page and set youre new default.

7
  • I tried setting the value but it didn't work. The option Require that this column contains information is still disabled. I modified the file in this path C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\LAYOUTS. Is it correct? Do I need to do anything on server after update the file?
    – Naveen
    Commented Nov 22, 2013 at 9:07
  • Yes that is the correct path. When I update the file on my dev machine with the following value bool bRequired = true and I refresh the browser the value is changed to required. Maybe youre in a multi server environment?
    – Remko
    Commented Nov 22, 2013 at 9:52
  • I think I am misreading you. The option Require that this column contains information is disabled i.e. I can see the radio buttons of Yes/No but I cannot change it and it's by default set to No. So do you mean with this setting the option would still be disabled but Yes would be selected by default OR the radio buttons would be enabled? And is this not possible on multi-server environment? Pardon for so many questions, I am still getting my head around SharePoint!
    – Naveen
    Commented Nov 22, 2013 at 9:58
  • With the option bRequired you change de default to Yes
    – Remko
    Commented Nov 22, 2013 at 10:32
  • if (spList == null && !string.IsNullOrEmpty(ContentTypeId)) strDisableRequired = "DISABLED" is causing the disabling of the field.. Changing this will allow you to change this field.. but this piece of code is there for a reason..
    – Remko
    Commented Nov 22, 2013 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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