Actions

Media form field type

From Joomla! Documentation

Revision as of 10:14, 21 May 2011 by Mvangeest (Talk | contribs)

The media form field type provides modal access to the media manager for the choice of an image. Users with appropriate permissions will be able to upload files.

  • type (mandatory) must be media.
  • name (mandatory) is the unique name of the field.
  • label (mandatory) (translatable) is the descriptive title of the field.
  • description (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.
  • directory (mandatory) is the directory from which the user will be able to choose a file. This attribute should be relative to the top level /images/ folder.

Example XML field definition:

<field name="myimage" type="media" directory="stories" />

This will open the media manager with the directory /images/stories/ already selected.

See also