Considering I customized my edit form a little, I want some predefined data to appear when that view is loaded, but the problem is that I just can’t find the template for it, nor do I have any idea on how to implement it.
As an example, I have added a field, ‘type’, and when I want to edit an event i want the coresponding type to be allready selected.
I am editing an existing event, but the value is not shown, it can’t be shown because it’s not stored anywhere, it’s just an informative input with data calculated in javascript once that event is shown
Try to set “onViewShow” for the form view and set a value for the field via setValue method:
$$("scheduler").$$("form").attachEvent("onViewShow",function(){
var id = $$("scheduler").getCursor(); // an active id
// calculate value
var value = ...;
$$("scheduler").$$("your_field_id").setValue(value);
});