Custom Site column Column using Feature in MOSS

if any one know how to create custom column using "Feature" feature of MOSS for the "Image" type
the following is the code for creating custom site column for "Choice" Type column

Feature.xml:
< xml version="1.0" encoding="utf-8" >
<Feature Id="CA7BD552-10B1-4563-85B9-5ED1D39C073B"
Title="myField"
Description="asdf"
Version="2.0.0.0"
Scope="Site"
xmlns="http://schemas.microsoft.com/sharepoint/">

<ElementManifests>
<ElementManifest Location="testing.xml"/>
</ElementManifests>
</Feature>

and following is testing.xml
< xml version="1.0" encoding="utf-8" >
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field ID="{1DAB9B48-2D1A-47b3-878C-8E84F0D322CB}"
Name="RegionFromFeature"
Group="my Column"
Type="Choice" // i need this for the Image type. i dont know what is format for that.
DisplayName="Region"
SourceID="http://schemas.microsoft.com/sharepoint/v3/fields"
StaticName="Features"
FillInChoice="FALSE">
<CHOICES>
<CHOICE>Parker</CHOICE>
<CHOICE>Dollar</CHOICE>
</CHOICES>
<Default>Dollar</Default>
</Field>
</Elements>



Answer this question

Custom Site column Column using Feature in MOSS

  • errolian

    My recommendation is to create a custom list.

    Add a column of your choice type. (image etc..)

    Save custom list as template.

    Save the generated listastemplate.stp file local to drive

    rename the *.stp to *.cab and open the manifestfile.xml.

    Look for your field definition in there.

    Hope this helps.



  • sparkymark75

    This is a sample for creating an Image type site column:

    Note that this is the Image field type that is available in MOSS 2007 publishing sites, not sure if this is what you want.

    <Field ID="{BBA5D17C-206F-4188-9C4F-F1721D3B163F}" Name="YourFieldName" StaticName="YourFieldname" SourceID="http://schemas.microsoft.com/sharepoint/v3" Group="Your group" DisplayName="Yourfield"
    Type="Image" Required="FALSE" Sealed="TRUE" RichText="TRUE" RichTextMode="FullHtml"></Field>


  • MrOctree

    hi!
    Thanx a lot for ur replies... which were really helpfull...
    here is another link which shows some more details about the other column types as well...

    http://sharethispoint.com/archive/2006/07/17/11.aspx

    thanx to all again.

    khalid

  • Custom Site column Column using Feature in MOSS