Hi all, I’m quite new so please forgive me if I seem a bit green. However I have a question relating to sending custom data when adding or updating events through the connector. I need to send to userids and jobids along with the standard payload and on receipt at the server using the connector save them to the database.
And help in the right direction would be very appreciated.
Hi,
the component sends all properties of the event object to the server. So if you assign a custom property to an event - it will sent to the server, no manual coding required.
In order to set initial values for a newly created events you can use docs.dhtmlx.com/scheduler/api__s … event.html
scheduler.attachEvent("onEventCreated", function(id,e){
var ev = scheduler.getEvent(id);
ev.userids = 0;
ev.jobid = 0;
});
In order to save these values to the database you need to add an appropriate columns to the db table and list them in a connector configuration
docs.dhtmlx.com/scheduler/how_to … sidescript
e.g.
$conn->render_table("events","id","event_start,event_end,event_text,userid,jobid");
docs.dhtmlx.com/connector__php__ … endertable
And I think thats it, new columns will be loaded to the client side and saved back to the database