Guest User

Untitled

a guest
Dec 14th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Ratasxy\ConeaBundle\Form;
  4.  
  5. use Symfony\Component\Form\AbstractType;
  6. use Symfony\Component\Form\FormBuilder;
  7.  
  8. class ParticipanteType extends AbstractType
  9. {
  10. public function buildForm(FormBuilder $builder, array $options)
  11. {
  12. $builder
  13. ->add('nombres', "text", array("label" => "Nombres: "))
  14. ->add('apellidos', "text", array("label" => "Apellidos: "))
  15. ->add('dni', "number", array("label" => "Numero de DNI: "))
  16. ->add('direccion', "text", array("label" => "Dirección: "))
  17. ->add('distrito', "text", array("label" => "Distrito: "))
  18. ->add('ciudad', "text", array("label" => "Ciudad: "))
  19. ->add('telefono', "text", array("label" => "Telefono: "))
  20. ->add('celular', "text", array("label" => "Celular: "))
  21. ->add('email', "email", array("label" => "Correo Electronico: "))
  22. ->add('cargo', "choice", array(
  23. "label" => "Grado: ",
  24. 'choices' => array(
  25. 'DELEGADO NATO' => 'DELEGADO NATO',
  26. 'DELEGADO PLENO' => 'DELEGADO PLENO',
  27. 'ASISTENTE' => 'ASISTENTE',
  28. ),
  29. 'required' => true,
  30. ))
  31. ->add('profesion', "choice", array(
  32. "label" => "Profesion: ",
  33. 'choices' => array(
  34. 'ESTUDIANTE' => 'ESTUDIANTE',
  35. 'PROFESIONAL' => 'PROFESIONAL',
  36. ),
  37. 'required' => true,
  38. ))
  39. ->add('universidad', 'entity', array(
  40. 'class' => 'ConeaBundle:Universidad',
  41. 'query_builder' => function(EntityRepository $er) {
  42. return $er->createQueryBuilder('u')
  43. ->orderBy('u.id', 'ASC');
  44. },
  45. 'multiple' => false
  46. ))
  47. ->add('fotoVoucher', "file", array("label" => "Voucher: "))
  48. ;
  49. }
  50.  
  51. public function getName()
  52. {
  53. return 'ratasxy_coneabundle_participantetype';
  54. }
  55. }
Add Comment
Please, Sign In to add comment