Wednesday, May 28, 2008

Enabling attachment functionality when using the Custom List Form Control in SharePoint 2007 / WSS 3.0

Many people have encountered this issue when using SharePoint custom list form. The “Attach File” link becomes automatically disabled and a simple solution unnecessarily becomes a complicated one by writing code behind.

Well, there is a proven solid solution to this problem thanks to Marc David. It took me a while to find out this blog and I successfully fixed up the issue by following the steps carefully.

Here is the URL: http://cid-6d5649bcab6a7f93.spaces.live.com/blog/cns!6D5649BCAB6A7F93!130.entry

Creating a custom list form.

Quite often we need to customize the out-of-the-box list form for different purposes (e.g. changing the look and feel, hiding columns from users, etc). There are a few things to be careful of when doing this task.
  • Be careful not to break the links (i.e. New, Edit, Display commands) by avoiding deleting the existing ListFormWebPart web part on the forms.
  • Simply right-click on the ListFormWebPart and click ‘Web Part Properties’ option. Expand ‘Layouts’ and select ‘Close the Web Part’ and ‘Hidden’. Click OK to save the changes.
  • If new file is created for custom list forms, then remember to right-click on the list name, select “Supporting Files” and change the appropriate forms for the “Item”, not the “Folder”. To select the Item content type, click on the “Content type specific forms:” drop-down list.*
  • Before customizing the forms, be sure to make a backup of the list, either backing up the whole site using stsadm command or just saving the list as a template so that you can always recreate it if things go wrong.