⚠ In case you've missed it we are migrating to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. Very soon this forum will be read-only and archived. ⚠


Getting setRelation field Value instead of ID in callback_before_insert

Callback set-relation

  • Please log in to reply
No replies to this topic

#1 AlokNikhil

AlokNikhil

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 26 December 2020 - 09: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.







Also tagged with one or more of these keywords: Callback, set-relation

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users