Jump to content


kenshicu

Member Since 16 Nov 2012
Offline Last Active Nov 29 2017 03:16 PM
-----

Topics I've Started

how implement callback_read_field

14 February 2014 - 04:41 PM

how I can implement callback_read_field, for modify the content of this view?

 


how implement callback_read_field

14 February 2014 - 04:17 PM

how I can implement callback_read_field, for modify the content of this view?

 


matches - rarely problem

12 February 2014 - 02:38 PM

hello to all

I have in GC1.3.3 a field  "password" and other "confirm_password" ,this last one does not exist in the database.
 
And I have this rule:

$crud->set_rules('confirm_password', 'Confirm password', 'required|matches[password]');


When migrating it to GC1.4.1, when I give to click in the button "save and go back", he does not do anything, does not work.

that he could be?

//sorry my bad english...

 


flexigrid find button problem

07 August 2013 - 02:22 PM

i have:
 

$crud->fields('field1','field2','field3','field4','field5');

$crud->columns('field1', 'field4', 'field5');

$crud->callback_column('field1',array($this,'_callback_field1'));

...

    //show name & first name & middle name
    function _callback_field1($value, $row)
    {
    return $row->field1.' '.$row->field2.' '.$row->field3;
    }

this shows me the value of field 1 + value of field 2 + value of field 3, in column 1

all good, but when I use the Search button in column 1, only looks for values of field 1 :(

 


field_type hidden and field_type date problem

02 August 2013 - 01:47 PM

$crud->fields('field1','field2','field3','field4');

$crud->field_type('field1', 'hidden');
$crud->field_type('field2', 'hidden');
//$crud->field_type('field3', 'date');
$crud->field_type('field4', 'hidden');

when editing a record,

where "field3" is of type date, I put the value: 2013-08-02

but to make a callback_before_update in post_array ['field3'] is saved: 02/08/2013, rather than: 2013-08-02

I think it is because I put the other fields, hidden type


I solved it in the callback_before_update adding:

$date_array = preg_split( '/[-\.\/ ]/', post_array['field3']);
post_array['field3'] =  date('Y-m-d',mktime(0,0,0,$date_array[1],$date_array[0],$date_array[2]));
return $post_array;

I think the library grocery_crud.php, has a small bug on this.
perhaps somewhere, does not run the function: _convert_date_to_sql_date($date)


regards