I have form with hidden unmapped field:
public function buildForm(FormBuilderInterface $builder, array $options)
{
...
$builder
...
...
->add(
'geolocationBreadcrumbs',
'hidden',
array(
'required' => false,
'mapped' => false
)
);
}
I want to get access to value of that field in TWIG via {{ form.vars.value.field_name }}
<div>{{ form.vars.value.geolocationBreadcrumbs }}</div>
But I have an error: Method "geolocationBreadcrumbs" for object "Site\UserBundle\Entity\User" does not exist in "%path_to_twig_template%"
Why does Symfony 2.3 try to find method for unmapped field in Entity Class and how I can to get access to unmapped filed value direclty from twig?
Thanks.