⚠ 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

How to get the current id that had been used when editing and viewing a record?



Katherine

Katherine
  • profile picture
  • Member

Posted 08 August 2013 - 14:31 PM

I am currently following the instruction by Alfonso Secas that he posted in this topic..

/topic/1326-how-to-use-grocery-crud-and-image-crud-together/page-2

And now on the part where he said "When editing a record, get the current ID from $this->getStateInfo(); to compose the iframe's source url."

It seems like getStateInfo doesn't exist yet so it shows an error "Fatal error: Call to undefined method Examples::getStateInfo() "

I wonder why i cant post a topic on grocery crud forum, so i ran into you again :)

davidoster

davidoster
  • profile picture
  • Member

Posted 09 August 2013 - 03:35 AM

Hello and welcome to the forums [member=katherine].

If we suppose you have $crud = new Grocery_CRUD();

then it is $crud->getStateInfo(); otherwise it is

$this->grocery_crud->getSateInfo();