After have followed the "Getting started: A skeleton application" of ZendFramework (and it works very well!), I'm trying to customize the Add a Album form. For information, I use the "3.0.2dev" version of Zend.
In this form, I use a dropdown menu called "language" (in Zend the component is Zend\Form\Element\Select).
The problem is there's a text input instead of the dropdown menu!!!!
Etudiant/src/Form/EtudiantForm.php:
$this->add([
'name' => 'annee_admission',
'type' => 'Zend\Form\Element\Select',
'options' => [
'label' => 'language',
'empty_option' => 'select a language',
'value_options' => [
'0' => 'French',
'4' => 'English',
'2' => 'Japanese',
'3' => 'Chinese',
],
],
]);
I've just spent several hours to check on other websites if there's a error, but no.This type of form seems to not be recognized!!
Does anyone have experienced this issue or has a solution for that?
Thanks in advance
Thanks Tim, I finally found the answer: In the .phtml, I used "$this->formInput" instead of "$this->formSelect".
Since this problem is solved, do you know how to populate a select form from the database (but from another module)? The getServiceLocator() is now deprecated in Zend 3, so I don't know how to do that.