Skip to main content

Select

Select

 

This allows the user to select one or more options that is provided. Typically the saved options are saved as a comma separated list in a single field unless bespoke behaviour is setup on the platform to handle comma separated values.

appearance="full"

Will show the options as checkboxes

appearance="minimal" will show the options as a dropdown.

 
 
<select1 bind="nCategories" appearance="full" class="required vshort">
          <label>Status</label>
          <item>
            <label>Category 1</label>
            <value>1</value>
          </item>
          <item>
            <label>Category 2</label>
            <value>2</value>
          </item>          <item>
            <label>Category 3</label>
            <value>3</value>
          </item>
        </select1>
 

Content Locations

 

We have some unique behaviour coded into Content xForms to allow us to create a tick list of pages to related the content items too.

 
 
<select bind="nLocation" appearance="full" class="contentLocations root-1 rootMode-include" showAllLevels="true" />
 
 

Adding a class of "contentLocations" will enable this behaviour. A class of root-# will define where the page tree is built from with# being the page id of the root page.

The following classes

rootMode-Exclude gets only descendants

rootMode-Include gets all descendants and the root node

rootMode-ChildrenOnly gets only the children of the root node

An additional attribute of "locationsXpath" can be used to pinpoint pages within the tree to add to the ticklist i.e.

 
 
<select bind="nLocation" appearance="full" class="contentLocations root-1 rootMode-include" showAllLevels="true" 
 locationsXpath="/descendant-or-self::MenuItem[@id='337' or @id='339' or @id='340' or @id='341' or @id='342' or @id='360' or @id='343' or @id='344' or @id='345']"/>