eventEdit extraWidgets value property does not set a default value for EventEdit forms if name parameter matches a property from eventRecord property. If I give some random name to name property, it sets a default value but then doesn't set proper field.
Try creating a new event by dragging around. You will see that, in the newly created event, agencyQWE field will have default value but agency field will not.
That is intentional behavior. When EventEdit.loadRecord is called it sets record to the editor form. It loops through the widgets and sets values based on record field. It's done in lib/Common/widget/Container.js
set record(record) {
const widgets = this.queryAll(w => w.name),
len = widgets.length;
for (let i = 0; i < len; i++) {
let widget = widgets[i],
name = widget.name;
if (name in record) {
widget.value = record[name];
}
}
this._record = record;
}
If you set a debugger there you'll see that default value is set correct. But since name is found in the record it sets to the widget's value. In your test case when you create new event the record field is empty, that's why you see empty field in the event editor.
and also there are 2 hooks in before event is added (beforeEventAdd event and onEventCreated template function) where you can set some field values, assign to a resource etc. But I've just found out that they are inconsistent at the moment. I've created a ticket to get it fixed: https://app.assembla.com/spaces/bryntum/tickets/7322