Jet\Form_Field_Range / Form_Field::TYPE_RANGE
Represents a form field in the form of a slider to select a number from a range.
The Jet\Form_Renderer_Field_Input_Number renderer is used to display the form field itself.
Default error codes
Code | Meaning of |
---|---|
Form_Field::ERROR_CODE_EMPTY | The field is marked as required and the value is not specified. |
Form_Field::ERROR_CODE_OUT_OF_RANGE | The numerical value is out of range. |
Parameters
Parameter | Type | Required | Meaning of |
---|---|---|---|
min_value | int | no | Minimum value. |
max_value | int | no | Maximum value - optional. |
step | int | no | Step by how much to change the value when using the arrows to change the value. Default: 1 |
Methods
Method | Meaning of |
---|---|
public getMinValue( ) : int|null |
Returns the set minimum value. |
public setMinValue( int $min ) : void |
Sets the minimum value. |
public getMaxValue( ) : int|null |
Returns the set maximum value. |
public setMaxValue( int $max ) : void |
Returns the set maximum value. |
public getStep( ) : int|null |
Returns the step by how much the value should change when using the arrows to change the value. |
public setStep( int $step ) : void |
Sets the step by how much the value should change when using the arrows to change the value. |