nabo Posted October 4, 2019 Share Posted October 4, 2019 Hello this is my script public function recordUserModifications() { $this->addHookBefore('Users::saveReady', function($event) { $page = $event->arguments('page'); $page->setTrackChanges(Wire::trackChangesValues); $page->setTrackChanges(true); $new_changes = $page->getChanges(true); die(var_dump($new_changes)); }); } and this is the result, when I change name and email array(2) { ["name"]=> array(1) { [0]=> NULL } ["email"]=> array(1) { [0]=> NULL } } I expect an associative array containing an array of previous values, indexed by property name, oldest to newest, but it's NULL. Thanks if you have some suggestions Link to comment Share on other sites More sharing options...
bernhard Posted October 4, 2019 Share Posted October 4, 2019 Hi @nabo See the example for changed order status here: https://processwire.com/blog/posts/new-ajax-driven-inputs-conditional-hooks-template-family-settings-and-more/#new-conditional-hooks 1 minute ago, nabo said: die(var_dump($new_changes)); You know about Tracy? ? 1 Link to comment Share on other sites More sharing options...
nabo Posted October 4, 2019 Author Share Posted October 4, 2019 1 hour ago, bernhard said: Hi @nabo You know about Tracy? ? Thanks ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now