I've this code in entity
/**
* @var float
*
* @ORM\Column(name="lng", type="decimal", precision=9, scale=6, nullable=true)
*/
private $lng;
in amdin class
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('lng')
...
}
It saves in normal precision (36.747148), but shows only 3 digits after dot (36.747). When I specify the type text it looks better but becomes required.
This works
->add('lng', 'text', ['required' => false])
is it the best/right solution? or do I need to change type decimal for something else?
You can solve the problem with required like this: