Jump to content


jt3angga

Member Since 18 Jul 2012
Offline Last Active Aug 01 2012 12:52 PM
-----

Topics I've Started

How to Print Post Array In Callback before Insert or Update

31 July 2012 - 07:26 AM

Hello,

I Create a Extra Field in My App, And the Field doesn't exist from table in the database,
How I can Get the Value in function Callback before Insert or Update??

My code :


$crud->fields('roleName','prv_list');
$crud->callback_field('prv_list',array($this,'group_prv_list'));
$crud->callback_before_insert(array($this,'before_insert_update_group_prv_list'));
$crud->callback_before_update(array($this,'before_insert_update_group_prv_list'));

function before_insert_update_group_prv_list($post_array, $primary_key = null) {
if($primary_key !== null) {
//Hot to get value From $post_array to update to Database
}
else {
//Hot to get value From $post_array to Insert to Database
}
return $post_array;
}


The prv_list Not In Table of Database, Just a Custom View
And Can we do print_r($post_array) ??

And The View Is

Attached File  View_crud.png   18.74K   793 downloads

Thanks, And Sorry My English is Very Poor :)

How to Create a set_relation_n_n with Quantity and Where Clause

20 July 2012 - 04:04 AM

Hello,

Can we create a Transaction Form use set_relation_n_n with quantity(or other field to view) and Where Clause ??

Thanks before :)

Create static selectbox not from relation and create free field not from field in table...

18 July 2012 - 04:00 AM

Hello,

I want to do the following:
  • Create a static select box from int file type not from relation table ?
  • Create an add/edit field not from field in table database(free field), if i using callback_add_field/callback_edit_field it only modification from existing field in table database ?
Thanks in advance :)