Media: Callback form

Last updated on
30 April 2025

In your hook_media_register you declare callbacks for each of the functions that are needed by the registered type.

Specifically, the callback form for formatters expects data to be returned in an ordered format. This allows a module to define the formatter form that is displayed once a resource has been chosen. Your form should utilize the following variables: my_module_format_form($node_type, $field, $file_extension).

Return a Drupal form array.

Help improve this page

Page status: Not set

You can: