<= [[plugin:struct|Struct Plugin]] <= [[plugin:struct:type|Types]] ====== Struct Plugin: Type Decimal ====== The ''Decimal'' type holds decimal numbers also known as float or double. Upper and lower bounds can be set through the config. The decimal point and thousands separator can be configured. Values can be rounded and trailing zeros be trimmed. Internally values are always stored with a dot as decimal point. Values can be entered with a dot or comma, but may not contain thousand separators. ===== Configuration ===== The following configuration is available in addition to the basic type [[type#configuration]]: ^ Config ^ Format ^ Description ^ | min | float | The number has to be at least this value. Be sure to specify decimals with a ''.'' as decimal point! | | max | float | The number may be at most this value. Be sure to specify decimals with a ''.'' as decimal point! | | roundto | integer | The number of decimals the values should be rounded to. Use ''-1'' for no rounding. (Note: If you leave this option blank, your decimal field will be broken.) | | decpoint | char | The character to use as a decimal point in output. You probably want to use either ''.'' or '',''. Regardless of this setting, users may always enter values with either of the two. | | thousands | char | The character to use as a thousands separator. The default is a thin non-breaking space. | | trimzeros | boolean | If true, trailing zeros are stripped from the decimals. | | prefix | string | This text will be prepended to the saved value - useful for currency symbols | | postfix | string | This text will be appended to the saved value - useful for currency symbols | | engineering | boolean | Enables engineering notation postfixes for numbers (1000 -> 1k) |