예제 #1
0
 public function buildForm()
 {
     $this->add('role_name', 'text', ['label' => 'Internship Role'])->add('related_field', 'select', ['choices' => Internship::relatedFields(), 'label' => 'Related Field', 'empty_value' => 'Select'])->add('company_name', 'text', ['label' => 'Company'])->add('location', 'text', ['label' => 'Location'])->add('description', 'textarea', ['label' => 'Description', 'attr' => ['rows' => 5]])->add('comments_application', 'textarea', ['label' => 'Comments on application', 'attr' => ['rows' => 5]])->add('start_date', 'month', ['label' => 'Start Date', 'default_value' => 'YYYY-MM'])->add('end_date', 'month', ['label' => 'End Date', 'default_value' => 'YYYY-MM'])->add('submit', 'submit');
 }
예제 #2
0
 public function buildForm()
 {
     $this->add('filter_by', 'choice', ['choices' => Internship::relatedFields(), 'selected' => array_keys(Internship::relatedFields()), 'multiple' => true, 'expanded' => true])->add('keyword', 'text', ['label' => 'Search by keyword'])->add('submit', 'submit');
 }