Jump to content


no delete rows, only change status

delete status

  • Please log in to reply
3 replies to this topic

#1 iezpinoza

iezpinoza

    Newbie

  • 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

fdias

    grocery CRUD Addict

  • Members
  • PipPipPip
  • 87 posts

Posted 22 June 2012 - 09:23 PM

It's easy.

Use callback_before_delete:

http://www.grocerycr...k_before_delete

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

http://www.grocerycrud.com/documentation/options_functions/unset_delete

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

http://www.grocerycrud.com/documentation/options_functions/add_action

I hope this helps.

#3 webmin_1800

webmin_1800

    Newbie

  • 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

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 955 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

logo.jpg    www.svc.by






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users