Jump to content


Robert

Member Since 03 Jun 2013
Offline Last Active Jan 26 2015 06:42 AM
-----

#10749 Capitalized text grocerycrud!

Posted Robert on 20 February 2014 - 03:31 PM

In DB to

 

$crud->callback_before_insert(array($this, '_uppercase_function'));
$crud->callback_before_update(array($this, '_uppercase_function'));

 

function _uppercase_function($post_array)  {
$post_array['fieldname'] = strtoupper($post_array['fieldname']);
......


return $post_array;
}



#10744 multiply two fields

Posted Robert on 20 February 2014 - 07:12 AM

Here is a small example to get you started

 

In the controller : 

$crud->callback_column('total', array($this,'_total')); // add total to display columns

now the callback function :

public function _total($value, $row) {
      return "$row->quantity x $row->price";
}



#9862 read page not showing relations

Posted Robert on 28 October 2013 - 08:57 AM

I have upgrated to 1.4.2 but it seams there are still problems with read .. if you use :

 

$crud->field_type('judet', 'dropdown', $judete);

 

then at read for the field you see the id not the name .. the edit/add part works good.




#9768 Saving image

Posted Robert on 16 October 2013 - 06:07 AM

Thanks for the code briggers but i jest modified the flexigrid css at " .flexigrid a img " adding height:80px; and this did the trick for my  needs, if this ca help someone.