⚠ 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

Call to undefined method grocery_CRUD::unset_fields()



farid
  • profile picture
  • Member

Posted 23 April 2012 - 07:29 AM

Hi all
when i try to use unset_fields method i see this erro:
[quote]
[b]Fatal error[/b]: Call to undefined method grocery_CRUD::unset_fields() ..........................................................
[/quote]

this is my code:

$this->load->library('grocery_CRUD');
$crud = new grocery_CRUD();

$crud->set_table('hm_tickets')
->set_subject('Tickets')
->set_relation('hm_ticket_segment_id','hm_ticket_segments','segment_title') ->columns('ticket_title','hm_ticket_segment_id','ticket_status','ticket_register_date')
->display_as('ticket_title','عنوان')
->display_as('hm_ticket_segment_id','بخش')
->display_as('ticket_description','توضیح')
->display_as('ticket_status','وضعیت')
->display_as('ticket_user_id','')
->display_as('ticket_register_date','زمان ارسال');


$crud->unset_fields('ticket_status');

$crud->callback_column('ticket_register_date',array($this,'duble_date'));
$crud->callback_add_field('ticket_status',array($this,'status')); $crud->callback_add_field('ticket_user_id',array($this,'user_id'));

$crud->add_action('Finish', 'http://www.nulledtemplates.com/images/ActiveDen-Extendable-Photo-Gallery-Rip_-evia_2.png', 'tickets/finish','ui-icon-plus');

$crud->unset_texteditor('ticket_description','full_text');
$output = $crud->render();



$this->load->view('header',$output);
$this->load->view('crud',$output);
$this->load->view('footer');


any idea how to solve this problem?

Ruedische
  • profile picture
  • Member

Posted 23 April 2012 - 18:10 PM

I think it's "unset_columns()", not "unset_fields".

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 23 April 2012 - 18:11 PM

Yes, you have old version of grocery CRUD the unset_field, unset_add_field and unset_edit_field has been added on version [color=#2C575B][font=Arial, Tahoma, Helvetica, sans-serif]v.1.2.1[/font][/color]

farid
  • profile picture
  • Member

Posted 24 April 2012 - 06:52 AM

oh sorry
yes i use v.1.2[font=monospace] and [/font]I did not pay attention to this subject