Form Control Parameters in Alfresco Share

Alfresco share which relies heavily on Share forms to manage content operations like creation, editing, view. Forms are not only limited to that even certain actions also use these forms internally to configure pages which need to be shown or more precisely to generate form which will be used to take user inputs during execution of action. One more usage is to configure workflow User Interface. Each and every task detail page of workflow is associated with one form in alfresco share.

We could configure these forms through share-config-custom.xml file. Once we configure any form in share-config-custom.xml file it will be automatically picked up by alfresco form services provided we have specified required condition correctly.

Now my main agenda here is to discuss various form control parameters which are used to change look, feel and behaviors of particular property in form. Those are set of predefined control parameters which rendering ftl (Freemarker Templates) are aware of. So, once you pass that control parameter in the appearance section of form which is defined within share-config-custom.xml it will be automatically picked up by related ftl file and it will render that component accordingly.

Sample Form in Share-config-custom.xml

form control parameters

As you can see in above configuration file there are two fields in this particular form. This is alfresco action form. Outer highlighted box shows appearance section which is used to set the look and feel of particular property included in the form.

Each control parameters are related with respective template. In this case we are using association.ftl for “cm:destionation” property.

The association control is used to allow objects in the repository to be picked and ultimately associated with the node being edited. The control uses the JavaScript Alfresco.ObjectFinder component to allow the user to browse the repository and pick objects.

Related Parameters

The parameters this controls supports are listed and explained below.


Parameter Name Type Mandatory Description
compactMode boolean False To show picker will be shown in compact mode
displayMode string False Decide the way to display current values, the default is “items”, when set to “list” the current items are shown in a rich list with buttons to manage the current items.
showTargetLink boolean False Determines whether a link to the document details page will be rendered to content items (only applicable when displayMode is set to “items”)
selectedValueContextProperty string False The name of a component binding property or url parameter that contains the values of the items to pre-select in the picker
selectActionLabel string False The label of the button that launches the picker, by default the label is “Select”
selectActionLabelId string False The resource bundle key of the label of the button that launches the picker
forceEditable boolean False Determines where to start the picker, the value can be any of the values below, the default is “{company home}”. Customized startLocations can also be implemented, see NodeLocatorService for more details.
startLocation string False NodeRef*
startLocationParams string False Query string formatted parameters for startLocation
allowNavigationToContentChildren boolean False Determines whether the picker can navigate the children of content nodes, the default is false

* Description about start Location Parameter Options

  • {companyhome}: Represents ‘Company Home’ space
  • {userhome}: Represents current users home space
  • {siteshome}: Represents ‘Sites’ space
  • {doclib}: Represents root of the Document Library for the site the item is part of. If the item is not part of a site the default is used. For “create” forms the “item” is considered to be the location the new item is being created in
  • {self}: Represents item being edited for “edit” forms and the location the item is being created in for “create” forms. This optionally will typically use with cm:folder types and sub-types
  • {parent}: The parent of the item being edited or the parent of the location the new item is being created in
  • {ancestor}: An ancestor node, same as {parent} without parameters. A type parameter can limit the ancestor node to a certain type or aspect parameter can limit to an ancestor node with a certain aspect applied. The node and aspect parameters can be combined.
  • A NodeRef e.g. workspace://SpacesStore/abcd-12345: Starts the picker in a specific location represented by the NodeRef
  • An XPath e.g. /app:company_home/app:dictionary: Starts the picker in a specific location represented by the XPath

Further Reading and References:

Looking for quality Alfresco Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , , , , , | Posted under Alfresco | RSS 2.0

Author Spotlight


I love opensource technologies working with those technologies from the time I have stepped in to the Software Industry. Alfresco CMS is my area of expertise. I have worked on various complex implementations which involved integration of Alfresco with other technologies, extensively worked with JBPM workflows and Webscripts.

Leave a Reply

Your email address will not be published. Required fields are marked *