Jump to content

no delete rows, only change status

delete status

  • Please log in to reply
4 replies to this topic

#1 iezpinoza



  • Members
  • Pip
  • 1 posts

Posted 22 June 2012 - 05:50 PM

first: sorry for my bad English

no delete rows, only change status

Spanish: (Como podría hacer para que cuando se elimine un registro realmente no se elimine, solo cambie su status)

#2 fdias


    grocery CRUD Addict

  • Members
  • PipPipPip
  • 93 posts

Posted 22 June 2012 - 09:23 PM

It's easy.

Use callback_before_delete:


If you don't want to log this info and really update what you can also do is use unset_delete:


Then you create an action named delete to update the record as you wish using the add_action function:


I hope this helps.

#3 webmin_1800



  • Members
  • Pip
  • 1 posts

Posted 02 February 2013 - 09:10 AM

I know it's an old post but I'm interested of this feature: changing status as inactive (not display in front page) instead deleting records, with the possibilities to activate records later.

#4 victor


    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 02 February 2013 - 10:02 AM

Hi webmin_1800 and welcome to the forum!
You can use the "unset_delete" function and the "add_action",
All function is here

#5 Jamal Javed

Jamal Javed


  • Members
  • Pip
  • 3 posts

Posted 22 April 2016 - 08:29 AM

I am facing the same problem I dont want to delete the record from db just want to update the status from 1 to zero but instead of using unset_delete can't I achieve this by chaning the defualt delete query. Please need help.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users