Skip to content

Commit 0cc23a6

Browse files
committed
Allow floats in input type number field
1 parent 8cf82db commit 0cc23a6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Form/Extension/Core/Type/NumberType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ public function buildView(FormView $view, FormInterface $form, array $options)
4747
{
4848
if ($options['html5']) {
4949
$view->vars['type'] = 'number';
50+
51+
if (!isset($view->vars['attr']['step'])) {
52+
$view->vars['attr']['step'] = 'any';
53+
}
5054
}
5155
}
5256

0 commit comments

Comments
 (0)