⚠ 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

Send a value from the CRUD to a view



connard

connard
  • profile picture
  • Member

Posted 14 April 2015 - 08:25 AM

Hey Guys, I'm stuck at something which must be simple...

 

I have a classic CRUD view loading to see the result of the CRUD like this, where I send the $output after the render() function.

 

    $this->load->view('my_view',$output);

 

BUT i want to load another view where I retrieve the value of one element of this CRUD when i am in "read" or "edit" state, for example:

 

 $this->load->view('my_other_view',$output->test_id);

 

Is that possible? How can i get the value of one element ?

 

Many thanks !

 

 


connard

connard
  • profile picture
  • Member

Posted 14 April 2015 - 09:49 AM

Ok I figured out how to send the primary key to my view of the element i am editing or viewing with

 

$this->grocery_crud->getStateInfo()->primary_key