Example #1
0
 /**
  * @param FormBuilderInterface $builder
  * @param array $options
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('type', 'choice', array('choices' => Job::getTypes(), 'expanded' => true))->add('category', null, ['label' => 'Category'])->add('company', null, ['label' => 'Company'])->add('file', 'file', array('label' => 'Company logo', 'required' => false))->add('url', null, ['label' => 'Url'])->add('position', null, ['label' => 'Position'])->add('location', null, ['label' => 'Location'])->add('description', null, ['label' => 'Description'])->add('how_to_apply', null, ['label' => 'How to apply?'])->add('is_public', null, ['label' => 'Is public?'])->add('email', null, ['label' => 'Email']);
 }
Example #2
0
 protected function configureFormFields(FormMapper $formMapper)
 {
     $formMapper->add('category')->add('type', 'choice', array('choices' => Job::getTypes(), 'expanded' => true))->add('company')->add('file', 'file', array('label' => 'Company logo', 'required' => false))->add('url')->add('position')->add('location')->add('description')->add('how_to_apply')->add('is_public')->add('email')->add('is_activated');
 }