Error in event template

Hello!
I try to replace combo select keys with combo select labels but i get error when i try create event…
This is my snippet docs.dhtmlx.com/scheduler/snippet/aea58ce4
Can you help me? Thank you

Hi,

When you create new event,

event.username == undefined

That is why error occurs in the line prntscr.com/jj4d0w

To fix it, you should update ‘if’ condition to the next one:

if(event.username){

docs.dhtmlx.com/scheduler/snippet/a6b24976

Also you can set default event.username value for a new created event when onBeforeLightbox event fires. As a result, you will get:
docs.dhtmlx.com/scheduler/snippet/a8f6b24c