⚠ 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

Getting setRelation field Value instead of ID in callback_before_insert



AlokNikhil
  • profile picture
  • Member

Posted 26 December 2020 - 21:27 PM

Hello Everyone

Before asking here I searched a lot on Internet however didn't got any solution.

 

Question: How to get book_name instead of book_id in callback_before_insert function?

 

Code line is 

$crud->setRelation('book_id','master_books','book_name');

Problem Statement: I want to create slug field value using book_name but not able to figure out that how to pass book_name instead of book_id in callback_before_insert function.

 

Thanking you in anticipation.