Source of file PercentageField.php
Size: 0,430 Bytes - Last Modified: 2021-12-24T06:35:01+00:00
/var/www/docs.ssmods.com/process/src/code/PercentageField.php
1234567891011121314151617181920212223242526 | <?php class PercentageField extends FormField { public function setValue($value) { if (!$value || $value < 0) { $value = 0; } return parent::setValue($value); } public function dataValue() { return $this->value / 100; } public function Value() { return ($this->value * 100) . "%"; } public function Type() { return 'percentage text'; } // TODO: add validation for min , max , and precision limits } |