Widgets can be used to enhance the classic fields of a form, to provide input assistance.

 

Below is a list of widgets supported for modifying content attributes by type.

  1. String field
  2. Binary" field type
  3. File" type field
  4. rich-text" field
  5. User" field type
  6. Content" field
  7. Multilingual-string" field type
  8. Boolean" type field
  9. Long" field type
  10. Double" field type
  11. Date" field
  12. datetime" field type
  13. geocode" type field

 

Note that some plugins provide their own widgets which are not listed here.
For example plugin Newsletter provides a widget to select a newsletter category.

String field

 

Id of widget

Description

Rendering

No

Simple text on a single line.
Widget by default.

<widget>edition.textarea</widget>
<widget-params>
<param name="maxLength">500</param>
<param name="charCounter">true</param>
</widget-params>

Multi-line text.

 

Possible parameters are :
  • height: height of rich text (default: 200 pixels)
  • maxLength: maximum number of characters allowed
  • charCounter : true to display a character counter

<widget>edition.select-page</widget>
<widget-params>
<param name="siteContext">all</param>
<param name="sitemapContext">all</param> 
</widget-params>

Select a page in the site map.

With free choice of site and language:

  • siteContext: all
  • sitemapContext: all

With choice of current site and language only

  • siteContext: current
  • sitemapContext: current

With choice of current site and any language:

  • siteContext: current
  • sitemapContext: all

 

<widget>edition.tag</widget>
<widget-params>
<param name="targetType">CONTENT</param>
<param name="allowCreation">true</param>
</widget-params>

Select one or more content or page labels.
 

The field value is the identifier of the selected label(s).

Possible parameters are :

  • targetType: PAGE or CONTENT to restrict the selection to page or content labels
  • allowCreation: true to authorize the creation of new labels from the widget
  • onlyTagsWithChildren: true to authorize only the selection of tags containing sub-tags (tag categories)

 

<widget>edition.explorer-folder</widget>

Selects a resource explorer directory

<widget>edition.combobox</widget>
<widget-params>
<param name="naturalOrder">true</param>
</widget-params>

Widget used for the fields listed.

Drop-down list for enumerated fields, with entries sorted alphabetically by default.

For entries to be sorted in natural order (order of definition in the file), set the "naturalOrder" parameter to true.

Binary" field type

Id of widget

Description

Rendering

<widget>edition.file</widget>
<widget-params>
<param name="allowExtensions">jpg,jpeg,gif</param>
<param name="filter">image</param>
</widget-params>

Allows you to download any type of local file.
 

widget displays the file name, size and thumbnail, and allows you to download the uploaded file.

Widget used by default for "binary" type fields

Possible parameters are :

  • allowExtensions: comma-separated list of allowed file extensions

  • filter: filter on file type (image, video, audio, multimedia, pdf)

 

File" type field

Id of widget

Description

Rendering

<widget>edition.file</widget>
<widget-params>
<param name="allowSources">external,resource</param>
<param name="filter">image</param>
</widget-params>

Allows you to download any type of local file or select a file from the resource explorer.

Possible parameters are :

  • allowSources: list of authorized sources. "external' for local files, 'resource' for resource explorer files.

  • allowExtensions: comma-separated list of allowed file extensions

  • filter: filter on file type (image, video, audio, multimedia, pdf)

rich-text" field

Widget

Description

Rendering

<widget>edition.richtext</widget>
<widget-params>
<param name="height">300</param>
<param name="maxLength">500</param>
</widget-params>
Widget used by default for "rich-text" fields
Possible parameters are :
  • height: height of rich text (default: 200 pixels)
  • maxLength: maximum number of characters allowed

User" field type

Id of widget

Description

Rendering

<widget>edition.user</widget>

Selects a person from the user database.

Use completion to search for a user.

Widget used by default for "user" type fields

Content" field

Id of widget

Description

Rendering

<widget>edition.select-content</widget>
<widget-params>
<param name="allowCreation">false</param>
<param name="allowSearch">true</param>
<param name="boxSize">large</param>
<param name="minChars">2</param>
</widget-params>

Widget used by default for "content" fields

 

Possible parameters are :
  • allowCreation: to allow or disallow the creation of new content from widget (false by default)
  • allowSearch: false to disable advanced search (true by default)
  • minChars: x pour activer la recherche à partir de X caractères

The boxSize parameter is available from version 4.4 onwards.

  • boxSize : 

default: the search window measures 600 pixels. This is the default value

wide: the search window measures 0.8 times the width of the window

<widget>edition.select-reference-table</widget>

Widget to be used for the selection of reference table content

Multilingual-string" field type

Id of widget

Description

Rendering

<widget>edition.multilingual-string</widget>

Widget used by default for "multilingual-string" fields

Set a text value for each available language

 

 

Boolean" type field

Id of widget

Description

Rendering

No

Widget used by default for "boolean" fields

 

Long" field type

Id of widget

Description

Rendering

No

Simple text field allowing only numbers to be entered.

Widget used by default for "long" type fields

Double" field type

Id of widget

Description

Rendering

No

Simple text field allowing only integers or decimals to be entered.

Widget used by default for "double" fields

 

Date" field

Id of widget

Description

Rendering

No

Select a date in a calendar.

Widget used by default for "date" fields

 

datetime" field type

Id of widget

Description

Rendering

No

Select date from calendar and time from editable drop-down list.

Widget used by default for "datetime" fields

 

geocode" type field

Id of widget

Description

Rendering

No

Numerical coordinate selection (latitude, longitude) using a map and a Google Map search field
Widget used by default for "geocode" fields

Back to top