Warning: You are browsing the documentation from version 4 to 10 of Pimcore. Please visit https://pimcore.com/docs/platform/ for the latest versions of Pimcore.
Version: Edit on GitHub

Numeric Editable


The numeric editable is very similar to the input editable, but with special configurations for the use with numbers.


Name Type Description
maxValue float Define a maximum value
minValue float Define a minimum value
width integer Width of the field in pixel
class string A CSS class that is added to the surrounding container of this element in editmode
required boolean set to true to make field value required for publish


Name Return Description
getData() int,float Value of the numeric field, this is useful to get the value even in editmode
isEmpty() boolean Whether the editable is empty or not


Basic Usage

{{ pimcore_numeric('myNumber') }}

Now you can see the numeric value in the editmode view Numeric input - editmode

Advanced Usage

In the following example we're going to use a minimal and maximum value as well as a decimal precision.

{{ pimcore_numeric('myNumber',{
		"width" : 300,
		"minValue" : 0,
		"maxValue" : 100,
		"decimalPrecision" : 0

To display the number also in editmode, you can use the method getData()

    {{ pimcore_numeric('myNumber').getData() }}