I’ve created a contentype that inherits from the item contenttype. So the contenttype automaticaly has the field: Title.
But how access this field (I want to add some custom validation and define if it is shown in editform)?
I want to do serverside validation and use the custom edititemform. Perhabs there is a possibility to delete/hide this field?
I’ve tried to change the content type to hide the title:
<Field
ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"
Name="Title"
StaticName="Title"
DisplayName="Title"
Type="Text"
FromBaseType="TRUE"
Required="FALSE"
Hidden="TRUE"
SourceID="http://schemas.microsoft.com/sharepoint/v3"
/>
<!-- Parent ContentType: Element (0x01) -->
<ContentType ID="0x0100b48c62c42879472aa8f1e1afc4dba7ce"
Name="aa- aa"
Group="Custom Content Types"
Description="My Content Type"
Inherits="TRUE"
Version="0">
<FieldRefs>
<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Hidden="TRUE" Required="FALSE" />
</FieldRefs>
But the title field is still required and shown.
I found the problem:
If I want to hide to remove the title collumn in my contenttype I have to disable the contenttypes inharitation. But after disabeling the inharitation the custom collumns will disapear after deployment. Because they are not part of the base type. SO the fields have to be declared in the list schema too.
MSDN
Contenttype
List Schema