Form Controls - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License

Controls are represented by a FreeMarker template snippet, and each field has a control and an optional set of parameters.

The following controls are available.

  • association.ftl

    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.ObjectPicker component to allow the user to browse the repository and pick objects.

    The following parameters are available:

    • compactMode: Determines whether the picker will be shown in compact mode.
    • showTargetLink: Determines whether a link to the document details page will be rendered to content items.
  • category.ftl

    The category control is used to allow the user to select categories for the node being edited. The control uses the JavaScript Alfresco.ObjectPicker component to allow the user to browse the category hierarchy.

    The following parameters are available:

    • compactMode: Determines whether the picker will be shown in compact mode.
  • checkbox.ftl

    The checkbox control renders a standard HTML check box control.

    The following parameters are available:

    • styleClass: Allows a custom CSS class to be applied to the check box.
  • date.ftl

    The date control renders a date field allowing free form entry of dates, as well as a calendar widget allowing dates to be selected visually. If appropriate a time field is also rendered.

    The following parameters are available:

    • showTime: Determines whether the time entry field should be displayed.
  • encoding.ftl

    The encoding control renders a selectable list of encodings.

    The following parameters are available:

    • property: The name of a content property to retrieve the current encoding from; if omitted the field.value value is used.
    • styleClass: Allows a custom CSS class to be applied to the select list.
  • invisible.ftl

    The invisible control renders nothing at all; it can be used when a form definition needs to be requested and returned but not displayed. This control has no parameters.

  • mimetype.ftl

    The mimetype control renders a selectable list of mime types.

    The following parameters are available:

    • property: The name of a content property to retrieve the current mime type from, if omitted the field.value value is used.
    • styleClass: Allows a custom CSS class to be applied to the select list.
  • period.ftl

    The period control renders a selectable list of periods and an expression entry field.

    The following parameters are available:

    • dataTypeParameters: A JSON object representing the period definitions to show in the list.
  • selectone.ftl

    The selectone control renders a standard HTML select list.

    The following parameters are available:

    • options: A comma separated list of options to display, for example "First,Second,Third". If a value for an option also needs to be specified, use the "First|1,Second|2,Third|3" format.
    • size: The size of the list, that is, how many options are always visible.
    • styleClass: Allows a custom CSS class to be applied to the select list.
  • selectmany.ftl

    The selectmany control renders a standard HTML select list allowing multiple selections.

    The following parameters are available:

    options (mandatory, comma separated string): A comma separated list of options to display, for example “First,Second,Third”. If a value for an option also needs to be specified the “First 1,Second 2,Third 3” format can be used.
    • size (optional, int): The size of the list i.e. how many options are always visible, the default is 5.
    • styleClass (optional, string): Allows a custom CSS class to be applied to the select list.
    • style (optional, string): Allows CSS rules to applied directly to the select list.
    • forceEditable (optional, boolean): Forces the control to be editable, default is false.
  • size.ftl

    The size control renders a read only human readable representation of the content size.

    The following parameters are available:

    • property: The name of a content property to retrieve the current content size from; if omitted the field.value value is used.
  • textarea.ftl

    The textarea control renders a standard HTML text area field.

    The following parameters are available:

    • rows: The number of rows the text area will have
    • columns: The number of columns the text area will have
    • styleClass: Allows a custom CSS class to be applied to the text area
  • textfield.ftl

    The textfield control renders a standard HTML text field.

    The following parameters are available:

    • styleClass: Allows a custom CSS class to be applied to the text field
    • maxLength: Defines the maximum number of characters the user can enter
    • size: Defines the size of the text field