KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Dashboard - FileUploader - fileHandle #3344

Closed Marloes opened this topic on on Sep 25 - 2 comments

Marloes commented on Sep 25

Hi, I have a Dashboard-page with the fileuploader and a button to handle stuff, the default-setting for the button is disabled(true). Is there a way to activate (disabled(false)) the button after a file is uploaded?

BTW: In fileuploader I tried to use

->fileHandle(function($file){
        $name = $file["name"];
        $tmp = $file["tmp_name"];
        //You can do any thing to handle your file here
    })

but it gives me an error.

Thyx in advance. With kind regards, Marloes

Sebastian Morales commented on Sep 26

You can try this server event "FileHandled" function:

    ->registerEvent("FileHandled", function($params) {
        $this->widget("TextBoxDemo")->disabled(true)->update(); // change "TextBoxDemo" to your widget name
    }) 
Marloes commented on Sep 26

Thx Sebastian, this works great!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed
solved

Inputs