|
|
@@ -1160,10 +1160,13 @@ class FormHelper extends AppHelper {
|
|
|
}
|
|
|
if (
|
|
|
$options['type'] === 'number' &&
|
|
|
- $type === 'float' &&
|
|
|
!isset($options['step'])
|
|
|
) {
|
|
|
- $options['step'] = 'any';
|
|
|
+ if ($type === 'decimal') {
|
|
|
+ $options['step'] = pow(10, -1 * substr($fieldDef['length'], strpos($fieldDef['length'], ',') + 1));
|
|
|
+ } elseif ($type === 'float') {
|
|
|
+ $options['step'] = 'any';
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|