This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Display the name but insert the id whit entity field type

New topics about Symfony 2 should go here

Display the name but insert the id whit entity field type

by Eguiarte » Fri Jun 19, 2015 4:58 am

Code: Select all
$builder->add('users', 'entity', array(
    'class' => 'AcmeHelloBundle:User',
    'property' => 'name',
));


Use this method to display a select users in a update form. The problem is that when the data are sent , send the name and want to send the id while showing the names in the select.

not use relationships in the database or the entities
Eguiarte
Junior Member
 
Posts: 1
Joined: Fri Jun 19, 2015 1:03 am