The Extended Attributes SubForm control allows you to quickly and easily collect extra data to store with a section (blog, forum, media gallery, hub) a post (WeblogPost, ForumPost, Thread, MediaGalleryPost), a User or anything else in Community Server which supports Extended Attributes.

The Extended Attributes Subform is configured very much like you configure a Theme's Dynamic Configuration properties through an xml file.

Using the Extended Attributes Subform

To use the ExtendedAttributesSubForm, you first need to create a config file to store a list of the properties you wish to collect.  (A sample file (ExtendedAttributes.config) is included in the download)

You then need to register the ExtendedAttributesSubForm with the form you want to collect additional data on.  The following provides some sample markup to display the subform  (A file (ExtendedAttributesSample.aspx) including this sample markup + more is included in the download).

<ACControl:ExtendedAttributesSubForm runat="server" ID="EASubform" ExtendedAttributesConfigurationFormId="configuration"
  ConfigurationFilePath="~/ExtendedAttributes.config" ConfigurationNodeName="UserProfileConfiguration" >
    <CSDynConfig:ConfigurationForm runat="server" id="configuration"
            <div class="CommonGroupedContentArea">
                <h3 class="CommonFormSubTitle"><CSDynConfig:PropertySubGroupData Property="Name" runat="server" /></h3>
                <table cellspacing="0" cellpadding="2" border="0" width="100%">
            <tr valign="top">
                    <div class="CommonFormFieldName"><CSDynConfig:PropertyData Property="Name" runat="server" /></div>
           <div class="CommonFormFieldDescription"><CSDynConfig:PropertyData Property="Description" runat="server" /></div>
                <td class="CommonFormField"><CSDynConfig:PropertyControl runat="server" /></td>

Two things to draw your attention to

  • ConfigurationFilePath - This is the path to the configuration XML file storing the properties you want the Sub Form to allow you to configure
  • ConfigurationNodeName - This is the node in the configuration XML file that stores the properites you want the Sub Form to allow you to configure.