I am working on a Symfony 3 project and I am facing a problem. When my form is submitted it changed the value from null
to zero
. But I would like that it keeps value it is sent. Because for me null
is different than 0
.
I have dump like (form use create form from scenarioProposalVersionModelizeCommand
):
dump($scenarioProposalVersionModelizeCommand->phaseProposalVersions[0]);
$form->handleRequest($request);
dump($scenarioProposalVersionModelizeCommand->phaseProposalVersions[0]);die;
Output so this 3 last values as you can see are transformed:
I was going over the problem by using directly information from request.
Using php condition to treat the
value: ""
But question is still valid.