Jump to content


Member Since 21 Jan 2020
Offline Last Active Jan 23 2020 03:16 PM

Topics I've Started

Problem with enum type in the creation form

21 January 2020 - 09:47 AM



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->required_fields('nom_usuel', 'description');
$crud->set_relation('type', 'type', 'nom');
$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();


Can anyone help me with this pb ? 


Thanks a lot !