⚠ 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

Custom Input field add



tofayelahmed

tofayelahmed
  • profile picture
  • Member

Posted 19 October 2012 - 06:29 AM

Hi all.
I need to a additional field which is not exist the database table.
Example: If amount field is the virtual or custom input field.
When data insert, the amount field value will be pass debit or credit field (which are database table field) with some checking.
Any help?

victor

victor
  • profile picture
  • Member

Posted 19 October 2012 - 15:00 PM

Hi!

......
$crud->add_fields('my_field');
$crud->change_field_type('my_field', 'text');
$crud->callback_edit_field('my_field',array($this,'callback_my_field'));
......
function callback_my_field($value = '', $primary_key = '')
{
your code
}

Hassan Zaman

Hassan Zaman
  • profile picture
  • Member

Posted 21 November 2012 - 07:05 AM

Thanks Victor :)