Hello,
If data row is not deleted, it doesn't show any text message.
How can I display it?
EDIT:
Should I use callback_after_delete?
And check if the data is still exist?
Is there a way to show the error message?
Thank You
⚠ 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. ⚠
Posted 18 December 2013 - 06:00 AM
Hello,
If data row is not deleted, it doesn't show any text message.
How can I display it?
EDIT:
Should I use callback_after_delete?
And check if the data is still exist?
Is there a way to show the error message?
Thank You
Posted 14 January 2014 - 05:31 PM
I can do this with:
$crud->set_lang_string('delete_error_message', 'My Own Error Message Here!'); $crud->callback_before_delete(array($this,'cek_before_delete')); function cek_before_delete($primary_key) { $this->db->db_debug = false; // IMPORTANT! (to make temporary disable debug) $this->db->trans_begin(); $this->db->where('id', $primary_key); $this->db->delete('your_table'); $num_rows = $this->db->affected_rows(); $this->db->trans_rollback(); if ($num_rows > 0) { return TRUE; } else { return FALSE; } }
Support →
I have a question →
Display custom error messageStarted by cksuperlatif, 04 Dec 2018 ![]() |
|
![]() |
||
Support →
Grocery CRUD Enterprise →
Image is not get deleted from the serverStarted by PHP Developer, 15 Mar 2018 ![]() |
|
![]() |
||
Support →
Grocery CRUD Enterprise →
How to redirect after insert / update / delete ?Started by darkstalker, 06 Jan 2018 ![]() |
|
![]() |
||
Support →
I have a question →
Error js bootstrap theme delete modalStarted by Paulo Rodriguez, 01 Jan 2017 ![]() |
|
![]() |
||
Support →
I have a question →
how set_crud_url_path and use of deleteStarted by Jhonatán Marin, 24 Nov 2016 ![]() |
|
![]() |
0 members, 0 guests, 0 anonymous users