symfony/symfony — Issue #3182: [Form] Hidden type value for entities
Author: Maks3w
Created: 2012-01-24 14:41:37+00:00
State: open

When render a hidden field from an entity it render using __toString() as value rather than use getId()

````php
class TestEntity
{
protected $id = 1;
protected $name = 'Test';

public function __toString()
{
return sprintf('Name: %s', $this->name);
}
}
````
````php
$builder->add('entity', hidden')
````
Result:

````html

````

When expects:

````html

````