Hey all,
I’ve created a panel hook for file uploads, I’m trying to assign a value to an empty page field when a file is uploaded.
For example; If I uploaded a video file, I’ll get the video duration through an existing hook. I’m wanting to set that duration as a meta field value to use else where in the site.
I’ve tried using the following which doesn’t seem to work, can anyone shed any light on why this wouldn’t work?
kirby()->hook('panel.file.upload', function($page) {
page('PAGE TITLE HERE')->set('test', 'testing123');
});
Am I missing something?
Cheers