Documentation

Component for rendering user fields

From the module main version 20.0.800 new API for [link=6684357]rendering user fields controls[/link].

Component currency.field.money renders user fields type money (money) using new API.

Component contains templates for desktop and mobile apps, supports option to modify external appearance of controls via standard template mechanism.

This component is a system component and is not displayed in the visual editor. It can be found in the site folder /bitrix/components/bitrix/currency.field.money.

Example of calling the component currency.field.money

Parameters

ParameterDescription
$userFieldArray of meta data for user field. It can be received via the method GetUserFields of class CUserTypeManager.
$additionalParametersArray, containing settings depending on the template that displays a control. Specifically, this array passes the following elements:
  • mode - component template name;
  • mediaType - current template page name or .default, mobile. Empty value is equivalent to .default.

Additional

Universal API also can be used:

$renderer = new \Bitrix\Currency\UserField\Renderer($userField, $additionalParameters);
return $renderer->render();
© «Bitrix24», 2001-2024
Up