Money

The "Money" type generates a simple <input> field, which converts the input to a floating point with 2 decimal positions, using the “.” (period) as the decimal delimited (accepts also “,” for the same).

It corresponds with the TCA type='input' (default) and eval='double2'.

Properties

size

| Required: false | Type: integer | Default: '20' |

Abstract value for the width of the <input> field.

required

| Required: false | Type: boolean | Default: 'false' |

If set, the field will become mandatory.

trim

| Required: false | Type: boolean | Default: 'false' |

If set, the PHP trim function is applied on the field's content.

valuePicker

| Required: false | Type: array | Default: '' |

Renders a select box with static values next to the input field. When a value is selected in the box, the value is transferred to the field. Keys:

items (array)

An array with selectable items. Each item is an array with the first being the value transferred to the input field, and the second being the label in the select drop-down (LLL reference possible).

Example:

valuePicker:
  items:
    100: 100
    250: 250
    500: 500

Example

group: common
fields:
  - identifier: money
    type: Money
    properties:
      size: 20
      required: true
      trim: true
      valuePicker:
        items:
          100: 100
          250: 250
          500: 500