⚠ 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

Set error message on callback insert/update



Zalo
  • profile picture
  • Member

Posted 02 April 2013 - 23: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!


davidoster
  • profile picture
  • Member

Posted 03 April 2013 - 07:34 AM

Yes you can by using this, http://www.grocerycrud.com/documentation/options_functions/set_lang_string.

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


Zalo
  • profile picture
  • Member

Posted 04 April 2013 - 03:33 AM

Good one! Thanks! :D


Awaza MP
  • profile picture
  • Member

Posted 08 November 2016 - 03:16 AM

hello.

I can set only one message.

I want to show several message with several cases.

I want your reply.