Blog Home  Home Feed your aggregator (RSS 2.0)  
.Net Jonesie - VSeWSS: Creating a Forms Library with a Content Type
A simple programmers blog
 
# Thursday, March 06, 2008

To create a forms library definition with VSeWSS 1.1 is very easy.  You can similarly create a list definition based on a content type.  However, you cant automatically create a forms library with an attached content type.

This is how I did it.

  1. Create your content type
  2. Create a temporary list based on the content type
  3. Create a form library list
  4. Edit the forms lib schema.xml
    1. Copy the content type fields from the temporary list schema to the <Fields> node.
    2. Update the <List> node, adding:

    3. BaseType="1"
      Direction="0"
      EnableContentTypes="TRUE"

    4. In <ContentTypes> optionally remove the base Form content type reference if you only want to allow the specific content type:

      <ContentTypeRef ID="0x010101"> ... </ContentTypeRef>

    5. Add a new <ContentTypeRef> that has the ID that matches the content type you created in step 1.

  5. Delete the temporary list definition
  6. Deploy and cheer!

 

Thursday, March 06, 2008 11:45:50 AM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   Sharepoint  | 
Comments are closed.
Copyright © 2012 Peter G Jones. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: