SummaryHOWTO configure percentage fields
Question/Problem DescriptionIn update.CRM web all percentage fields are displayed with a slider (plus adjacent number input). The widget used for displaying the slider is called u8.Base.Widgets.RangeInput . The corresponding FieldWidgetFactory entry is PercentField .
This article describes how to change the displayed range and other useful options.
EnvironmentAureaCRM 8.x and 9.x
Default options for the widgetPer default all percentage fields show a slider from 0 to 100 % with a snap based on the available digits after the comma and a pagesize of 10%.
Note: we do not take information from the data model into account to generate these values. i.e. setting the negative values flag for a field will not make the slider display a different range. If you want negative values displayed, you need to change the min value as described in the section below.
HOWTO Change optionsTo change slider options, you can provide the FieldWidgetFactory entry with additional options for the widget via the Widget attribute of the field in a Field Control.
The available options are:
|the minimum selectable value
|the maximum selectable value
|the minimum step size when using the slider, e.g. when snap is 5 and the current value is 10% and you move the slider to the right, the next value is 15%
|The widget will automatically round to the precision given by this option.
|as defined by the fieldschema in the datamodel
|the value change when using page-up and page-down on your keyboard
|(max - min)/10
ExampleIf you enter the following code into the Widget attribute of a percentage field, the resulting widget will display a slider that allows you to select values from -50% to 200% in steps of 5%.
HOWTO disable a percentage fieldIf you do not want to display a slider at all and are satisfied with a plain text field, you can just enter TextField in the Widget attribute of the field in a field control.
A good place to turn it off would be an unlimited percentage field (like "Weighting" in Questions of a Questionnaire).