Código PHP:
class ApplicantAdminType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('surname')
->add('forename')
->add('entryGrade','entity',array('class'=>'ABCIsystemBundle:AbcGrade',
'query_builder' => function(EntityRepository $er) {
return $er->createQueryBuilder('s')
->select("s"); },
'property'=>'name', ))
Código PHP:
Entry grade<br>
{{form_widget(edit_form.entryGrade, {'attr': {'class': 'span11', 'tabindex':4}})}}
El
Código PHP:
ABCIsystemBundle:AbcGrade