Skip to main content
Skip table of contents

Number Widget

Definition

There are two Widgets allowing to configure the display /edit of numbers (integer, decimal) attributes. 

  • Number Input Edit

  • Number Display

Number Input Edit

Number Display

Configuration

Properties

Properties name

Type

Mandatory

Description

Values (default value in bold)

Edit

Display

required

Boolean

NO

Defines if the attribute is mandatory or not.

true, false

(tick)

(error)

decimals

Integer

NO

Defines the authorized decimals of the attribute.

Only if the type = DECIMAL NUMBER

0, 1, 2, 3...

(tick)

(error)

forceStepDivisibility

String

NO

Used to specify how to force the value to be divisible by step

none, round, floor, ceil

(tick)

(error)

max

Integer

NO

Defines the maximum value that can be entered by the user.

If the indicated value is greater than the maximum value, by default, the maximum value will be indicated in the field.

0, 1, 2, 3...

(tick)

(error)

min

Integer

NO

Defines the minimum value that can be entered by the user.

If the indicated value is smaller than the minimum value, by default, the minimum value will be indicated in the field.

0, 1, 2, 3...

(tick)

(error)

suffix

String

NO

Defines a value after the field.

-

(tick)

(tick)

prefix

String

NO

Defines a value before the field.

-

(tick)

(tick)

step

Float

NO

Defines an increment/decrement value.

0.0

(tick)

(error)

verticalButtons

Boolean

NO

Allows to choose the display of the "plus" and "minus" buttons.

true, false

(tick)

(error)

verticalDownClass

String

NO

Defines the icon to display inside the button.
Link to find the icons : https://fontawesome.com/v4.7.0/icons/

fa fa-"name of the icon"

(tick)

(error)

verticalUpClass

String

NO

Defines the icon to display inside the button.
Link to find the icons : https://fontawesome.com/v4.7.0/icons/

fa fa-"name of the icon"

(tick)

(error)

backgroundColor

String

NO

Defines the displayed background color.

Standard CSS color value, #ffffff

(error)

(tick)

bold

Boolean

NO

Defines if the value is displayed in bold or not.

true, false

(error)

(tick)

fontSize

Enum

NO

Defines the displayed size.

INHERIT, XX_SMALL, X_SMALL, SMALL, MEDIUM, LARGE, X_LARGE, XX_LARGE

(error)

(tick)

italic

Boolean

NO

Defines if the value is displayed in italic or not.

true, false

(error)

(tick)

textAlign

Enum

NO

Defines where the text is aligned when displayed.

LEFT, CENTER, RIGHT

(error)

(tick)

textColor

String

NO

Defines the displayed text color.

Standard CSS color value, #000000

(error)

(tick)

underline

Boolean

NO

Defines if the value is underlined or not.

true, false

(error)

(tick)

Example

Number Input Edit

Number Display

XML
<widget id="level" xsi:type="ctdbum:AttributeEditorWidgetType">
	<hidden>false</hidden>
    <config>
    	<editor>
        	<editWidget xsi:type="ctdbum:NumberInputEditWidgetType">
            	<hidden>false</hidden>
                <config>
                    <required>false</required>
                    <decimals>0</decimals>
					<forceStepDivisibility>none</forceStepDivisibility>
                    <max>1200</max>
                    <min>0</min>
                    <suffix></suffix>
                    <prefix></prefix>
                    <step>1.0</step>
                    <verticalButtons>true</verticalButtons>
                    <verticalDownClass>glyphicon glyphicon-minus</verticalDownClass>
                    <verticalUpClass>glyphicon glyphicon-plus</verticalUpClass>
				</config>
			</editWidget>
		</editor>
        <label></label>
        <lockedInUi>false</lockedInUi>
        <mode>READ_WRITE</mode>
        <multiValued>false</multiValued>
        <override>true</override>
	</config>
    <attributeId>level</attributeId>
</widget>
XML
<widget id="createdat" xsi:type="ctdbum:AttributeEditorWidgetType">
	<hidden>false</hidden>
    <config>
    	<editor>
        	<displayWidget xsi:type="ctdbum:NumberDisplayWidgetType">
            	<hidden>false</hidden>
                <config>
                	<backgroundColor>#ffffff</backgroundColor>
                    <bold>false</bold>
                    <italic>false</italic>
                    <textAlign>LEFT</textAlign>
                    <textColor>#000000</textColor>
                    <underline>false</underline>
					<prefix></prefix>
					<suffix></suffix>
 				</config>
			</displayWidget>
		</editor>
        <label></label>
        <lockedInUi>false</lockedInUi>
        <mode>READ</mode>
        <multiValued>false</multiValued>
        <override>true</override>
	</config>
    <attributeId>createdat</attributeId>
</widget>

Read Next

  • Features

    Design screens and business features to manage objects.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.