.. include:: ../../../Includes.txt .. _callbackViewHelper: :navigation-title: Callback ViewHelper ================================== Callback ViewHelper `` ================================== ViewHelper that includes a JavaScript function. Go to the source code of this ViewHelper: `CallbackViewHelper.php `_ (GitHub). Arguments ========= The following arguments are available for the callback ViewHelper: .. confval:: key :name: callbackKey :Type: string :required: true Callback key .. confval:: fileName :name: callbackFileName :Type: string :default: '' File name containing the JavaScript function Examples ======== With fileName attribute ----------------------- The JavaScript function must be in the given file name. .. code-block:: xml Child nodes ----------- The JavaScript function is provided in the child node. .. code-block:: xml function(context) { return context.label + ' - ' + context.formattedValue + ' €'; }