I have been tring to create a text field (SPFieldText) with a custom format XX-XXXX-XXXX and add a check (control) so that when you add a dokument with same property but different format to a document library. Sharepoint would alert the user that the property has wrong format. Is it possible? thanks.
Tell me more
×
SharePoint Stack Exchange is a question and answer site for
SharePoint enthusiasts. It's 100% free, no registration required.
|
The MSDN custom field type walkthrough covers a scenario very similar to your own. |
|||
|
|
|
You will need to create a custom Text field which derives from SPFieldText and override the GetValidatedString method. Her you can put your logic to check if the text entered adheres to the format or not. You may find this link useful: http://www.c-sharpcorner.com/uploadfile/Roji.Joy/creating-a-custom-field-type-for-sharepoint-2010-email-validation-field/ |
|||
|
|
