Reputation: 1618
I'm creating a Sonata Admin page for an Entity (generated with Symfony CLI).
In this Entity I have 3 textfields and 1 checkbox(boolean). Everthing is well generated except the checkbox. The checkbox is strangly located and there is no label.
In the configureFormFields I defined the checkbox field as it:
->add("online",null, array('required' => false, "label" => "My label"))
And on the Entity I have:
/**
* @ORM\Column(name="online", type="boolean", nullable=false)
*/
private $online;
Here is a screenshot:
Is it a known problem? Have you got any solution?
Upvotes: 2
Views: 4228
Reputation: 1618
OK I found the solution:
I was using Symfony 2.6.* when I changed to Symfony 2.3 problem was fixed!
So I look in SonataAdmin GitHub issue to found this working solution: https://github.com/sonata-project/SonataAdminBundle/issues/2630
At the end I am in Symfony 2.6 with checkbox label.
Upvotes: 3