Jump to content


Custom Input field add

custom input

  • Please log in to reply
2 replies to this topic

#1 tofayelahmed

tofayelahmed

    Advanced Member

  • Members
  • PipPipPip
  • 63 posts

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?

#2 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 19 October 2012 - 03: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

}



#3 Hassan Zaman

Hassan Zaman

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 21 November 2012 - 07:05 AM

Thanks Victor :)





Also tagged with one or more of these keywords: custom, input

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users