⚠ In case you've missed it we are migrating 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 forum is read-only and soon will be archived. ⚠


Member Since 16 Nov 2012
Offline Last Active Feb 09 2021 05:44 PM

#8747 Jquery 1.9.1

Posted kenshicu on 02 August 2013 - 02:24 PM

maybe adding the jQuery Migrate plugin, solve your issue.

#8066 Taking where_in function () in codeigniter to GC

Posted kenshicu on 19 June 2013 - 03:03 PM

In the library grocery_crud.php in function protected function get_list()


   foreach($this->in_where as $in_where):
	$this->basic_model->where($in_where[0].' in '.$in_where[1]);

In class grocery_CRUD extends grocery_CRUD_States add:

protected $in_where 			= array();

also add in the same class, after function public function or_where(..), the following function:

public function in_where($key, $value = NULL, $escape = TRUE)
		if ($value != '()') $this->in_where[] = array($key,$value,$escape);

in the controller:

$crud->in_where('workers.id_workplace', $workplace_list);

where $workplace_list containing for example: (1, 15, 3, 8, 20)

is a list of id of workplaces, to get only the workers who are in the workplace specified in the list.



if anyone has a better idea, tell me :)




#6557 help me with Field function

Posted kenshicu on 25 March 2013 - 05:43 PM

in add/edit form I need to put a selectbox or textbox (field4), which does not exist in the database, so I put:


but to save the form, by clicking the button (Save and go back to list), the system does nothing, does not save, does not move. :(

#6475 Share your Themes

Posted kenshicu on 20 March 2013 - 10:11 PM

I made some modifications to flexigrid theme, I put the buttons bootstrap and relocate the button to search


download: http://www37.zippysh...71613/file.html



#6462 Why do I lose a Dropdown CSS style when I make a Callback

Posted kenshicu on 20 March 2013 - 04:05 PM

I found a solution, I put in bold. For some reason did not load the CSS and JS for chosen


// Ayudante de funciones de Filtrar DropDowns segĂșn el usuario logeado
function filter_dropdown($table, $id_table, $desc_table, $id_field)
 $this->db->select ( '*' );
 $this->db->from ( $table );
 $this->db->where ( $id_table, $id_field );
 $result = $this->db->get ();
 $data = $result->row ();	

 	$html = '<link type="text/css" rel="stylesheet" href="'.base_url().'/assets/grocery_crud/css/jquery_plugins/chosen/chosen.css" />';
	$html .= '<script src="'.base_url().'/assets/grocery_crud/js/jquery_plugins/jquery.chosen.min.js"></script>';
	$html .= '<script src="'.base_url().'/assets/grocery_crud/js/jquery_plugins/config/jquery.chosen.config.js"></script>';
 $html.= '<div><select name="'.$id_table.'" class="chosen-select" data-placeholder="Selecciona '.ucwords($table).'" style="width: 200px;">';
 $html.= '<option value=""></option>';
 $html.= '<option value="'.$data->$id_table.'" >'.$data->$desc_table.'</option>';
 $html.= '</select></div>';
 return $html; 
 // retorna el selectbox filtrado

#6359 How to add two more fields when I edit a record, and update another table also

Posted kenshicu on 16 March 2013 - 11:40 PM

How to add two more fields when I edit a record, and update another table also

In order to normalize the database and avoid duplicate fields need to make this change in the structure of the database:


As seen, i remove  id_provincia and id_municipio fields of trabajador table, and then it will not leave these fields when adding or editing the main table (trabajador) with GC.

How do I keep these two fields to add or edit records.

And in edit record of trabajdor table, as knowing the id_municipio and id_provincia through id_consejo_popular ? :wacko:

#6356 add and edit form in two columns

Posted kenshicu on 16 March 2013 - 10:22 PM

I created something about it, in add.php and edit.php files in the path:

I added this code to test, still not finished.

<?php    if( $counter <= 45) { ?>
<div style="float:left;">
<?php   } ?>    

<?php    if( $counter > 45) { ?>
<div style="float:right;">
<?php   } ?>

before the line:

<div class='form-field-box <?php echo $even_odd?>' id="<?php echo $field->field_name; ?>_field_box">

with the intention of using more space on the screen, look something like this:


good ideas are welcome :)

#4582 Reports in grocery crud?

Posted kenshicu on 04 December 2012 - 02:30 PM

I found this library to convert to pdf using dompdf

dompdf site: https://github.com/dompdf/
codeigniter + dompdf: https://github.com/i...eigniter-DOMPDF
dompdf updated: https://github.com/d...ompdf/downloads