.. include:: /Includes.rst.txt .. _field_type_percent: ======= Percent ======= The "Percent" type generates a simple `` field, which provides a slider for value picking. It corresponds with the TCA `type='input'` (default) with `range` and `slider` properties. Properties ========== .. rst-class:: dl-parameters default :sep:`|` :aspect:`Required:` false :sep:`|` :aspect:`Type:` integer :sep:`|` :aspect:`Default:` 0 :sep:`|` Default value set if a new record is created. range :sep:`|` :aspect:`Required:` false :sep:`|` :aspect:`Type:` array :sep:`|` :aspect:`Default:` '' :sep:`|` An array which defines an integer range within which the value must be. Keys: lower (integer/ float) Defines the lower integer value. Default: 0. upper (integer/ float) Defines the upper integer value. Default: 100. It is allowed to specify only one of both of them. Example: .. code-block:: yaml range: lower: 0 upper: 100 required :sep:`|` :aspect:`Required:` false :sep:`|` :aspect:`Type:` boolean :sep:`|` :aspect:`Default:` 'false' :sep:`|` If set, the field will become mandatory. size :sep:`|` :aspect:`Required:` false :sep:`|` :aspect:`Type:` integer :sep:`|` :aspect:`Default:` '20' :sep:`|` Abstract value for the width of the `` field. slider :sep:`|` :aspect:`Required:` false :sep:`|` :aspect:`Type:` array :sep:`|` :aspect:`Default:` '' :sep:`|` Render a value slider next to the field. Available keys: step (integer / float) Set the step size the slider will use. For floating point values this can itself be a floating point value. Default: 1. width (integer, pixels) Define the width of the slider. Default: 100. Example: .. code-block:: yaml range: step: 1 width: 100 trim :sep:`|` :aspect:`Required:` false :sep:`|` :aspect:`Type:` boolean :sep:`|` :aspect:`Default:` 'false' :sep:`|` If set, the PHP trim function is applied on the field's content.