⚠ 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

Html select field disappears in the edition (dropdown)



dblanco

dblanco
  • profile picture
  • Member

Posted 26 December 2012 - 14:20 PM

I have a problem to present a select option, from a relationship based on the edit screen (1-N).

With this configuration:
$this->grocery_crud->set_table('contactos');

$this->grocery_crud->set_relation('id_motivo', 'motivos', 'motivo');
$this->grocery_crud->set_relation('id_usuario', 'usuarios', '{nombre} {apellido}');

$this->grocery_crud->change_field_type('leido', 'true_false');
$this->grocery_crud->change_field_type('fecha', 'datetime');
$this->grocery_crud->change_field_type('fecha_leido', 'datetime');

$this->grocery_crud->edit_fields('fecha','id_motivo', 'nombre', 'email', 'mensaje', 'leido');
$this->grocery_crud->callback_edit_field('leido', array($this,'_leidoo_formato'));
$this->grocery_crud->callback_update(array($this,'_editar_registro'));

I add the image ([attachment=407:26122012_1.jpg]) )where you can see that initially presented correctly the edit form. Where in the dropdown is selected "Consulta". But when you click to select other "Motivo" the combo disappears ([attachment=408:26122012_2.jpg]).

With another click on the place where it should be the dropdown, you can edit the field, but do not select an option from the database (Table Motivos). As this edition is disabled? ([attachment=409:26122012_3.jpg]) It should not be possible to edit the value, select one of the options in the database.
Unable to re-display the html select after these actions.

Using these versions:
Codeigniter 2.0
Grocery Crud 1.3.3
Browser: Mozilla Firefox 17.0.1.

What can be the problem? Thanks for your time and help.

victor

victor
  • profile picture
  • Member

Posted 26 December 2012 - 15:27 PM

maybe you have a Javascript error or conflict between scripts?

dblanco

dblanco
  • profile picture
  • Member

Posted 26 December 2012 - 15:31 PM

Shows no errors using Firebug.

victor

victor
  • profile picture
  • Member

Posted 26 December 2012 - 19:17 PM

Or css?

dblanco

dblanco
  • profile picture
  • Member

Posted 26 December 2012 - 19:37 PM

The Firebug console shows no problems with css. These are the files that load:
<link href="http://localhost/css/main.css" rel="text/css">
<link type="stylesheet" href="http://localhost/assets/grocery_crud/css/jquery_plugins/chosen/chosen.css" />
<link type="stylesheet" href="http://localhost/assets/grocery_crud/themes/flexigrid/css/flexigrid.css" />
<script src="http://localhost/assets/grocery_crud/js/jquery-1.8.2.min.js"></script>
<script src="http://localhost/assets/grocery_crud/js/jquery_plugins/jquery.chosen.min.js"></script>
<script src="http://localhost/assets/grocery_crud/js/jquery_plugins/config/jquery.chosen.config.js"></script>
<script src="http://localhost/assets/grocery_crud/themes/flexigrid/js/jquery.form.js"></script>
<script src="http://localhost/assets/grocery_crud/themes/flexigrid/js/flexigrid-edit.js"></script>

dblanco

dblanco
  • profile picture
  • Member

Posted 26 December 2012 - 19:42 PM

Sorry, it was something as simple as the site itself css file. Making the file works, I'll have to look where the problem

<link href="http://localhost/css/main.css" rel="text/css">

Edwin Resendiz Gonzalez

Edwin Resendiz Gonzalez
  • profile picture
  • Member

Posted 08 September 2016 - 17:35 PM

Hi, I really want to know how to fixed it, because I'm having the same problem in this moment, sorry my english is too bad.