Scheduler upload image

Is it possible to add in the edit event form a new line with a file upload control, to load a picture and display it after uploading has succeeded?
Desired result would look like:

Name: testName

StartDate: mm/dd/yyyy

EndDate: mm/dd/yyyy

Photo: button to upload if there is no pic added, or to show the pic if one was uploaded or allready exists (got it by json)

Hello,

You can use Uploader view for image upload:

http://docs.webix.com/desktop__uploader.html

Here is an information about Form:

http://docs.webix.com/mobile_calendar__details_form.html

Thanks for the info, I managed to implement it, but I am not sure how/from where to call the save method for the uploader, as I have set it’s autosend to false, and the save method for the form is the predefined one:

{ view: “scheduler”, id: “scheduler”, save: myMethod}

and in myMethod I don’t receive as parameter the uploader content…which would be usefull:)

There is not possibility to pass uploader data via built-in save. But you can add event id to uploader data (the second parameter of send method):

http://docs.webix.com/api__ui.uploader_send.html

onAfterAdd and onStoreUpdated event allows to listen to “save” click ( please find 01_basic/03_events.html demo in scheduler package )

Thanks for the input, but on the onAfterAdd method, i tried to call the uploader’s save, which crashes.
This is how my method looks at the moment:

$$(“scheduler”).data.attachEvent(“onAfterAdd”, function (id) {

webix.alert("Item '" + this.getItem(id).text + "' has been added");
$$("scheduler").$$("uploader").send(id); 

});

I see the alert, but then I get an error. The error is - Cannot read property ‘status’ of undefined.

The uploader is defined in scheduler.config.form[]

The first parameter of send method is file id (not an event id).

If you want to send all added files, use null as the first parameter.

Got it, thanks!