⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Problem with enum type in the creation form



wyllyjon
  • profile picture
  • Member

Posted 21 January 2020 - 09:47 AM

Hello, 

 

I have created a table that have that field : 

apport_compost ENUM("Aucun", "Modéré (- de 3kg/m²)", "Important (3kg/m²)", "Très important (+ de 3kg/m²)")

But when the creation form is generated, in front of "Apport Compost", I have a combobox that only have the following options : "Aucun", "Modér"

 

I don't think the problem comes from the sql creation script (has If I try to insert a row with phpmyadmin, I do have the right values in the Apport Compost combobox).

 

 

My script to create the form is really simple :

$crud = new grocery_CRUD();


$crud->set_theme('flexigrid');
$crud->set_table('semis');
$crud->set_subject('Semis');
$crud->required_fields('nom_usuel', 'description');
$crud->set_relation('type', 'type', 'nom');
$crud->columns('nom_usuel','type');
$crud->fields('nom_usuel','nom_latin', 'type', 'description', 'commentaire_culture', 'debut_semis_abris', 'fin_semis_abris', 'debut_semis_terre', 'fin_semis_terre', 'debut_recolte', 'fin_recolte', 'apport_compost', 'exposition', 'qualite_sol', 'taille_plants', 'culture', 'date_recolte_graines', 'duree_germinative', 'code_sachet');




// $output = $this->grocery_crud->render();
$output = $crud->render();


     $this->_example_output($output);

Can anyone help me with this pb ? 

 

Thanks a lot ! 

 

Jonathan