⚠ 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 forum is read-only and soon will be archived. ⚠

Set error message on callback insert/update

error message callback insert update

  • Please log in to reply
3 replies to this topic

#1 Zalo


    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 02 April 2013 - 11:25 PM

Quick question:

Is there a parameter or some variable/array/something you can set from a callback_before/after_insert/update where you can set a custom error message?

For example:

You have an article form... and you include some custom field. You check that its value it's ok with the function callback_before_insert/update. If it's not you just return false. Is there (already) a way to set the error message so you can tell the user WHY it failed?


Thanks in advance!

#2 davidoster


    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts

Posted 03 April 2013 - 07:34 AM

Yes you can by using this, http://www.grocerycr...et_lang_string.

Get all the possible language strings from assets/grocery_crud/languages/your_lang.php

#3 Zalo


    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 04 April 2013 - 03:33 AM

Good one! Thanks! :D

#4 Awaza MP

Awaza MP


  • Members
  • Pip
  • 2 posts

Posted 08 November 2016 - 03:16 AM


I can set only one message.

I want to show several message with several cases.

I want your reply.

Also tagged with one or more of these keywords: error message, callback, insert, update

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users