fire event when displaying editform

How can i do this?

I have tried

$$(“scheduler”).$$(“editForm”).attachEvent(“onShow”,function(){
alert(“onShow editForm”);
});

but it does not fire.

i can get an event to fire with

$$(“scheduler”).$$(“editForm”).elements[“start_date”].attachEvent(“onAfterRender”,function(){

but once this has been rendered the first time it does not fire again.

one work around i found in case nobody answers the original question is that i used the following:

$$(“scheduler”).$$(“add”).attachEvent(“onItemClick”,function(){
alert("add button clicked " + $$(“scheduler”).$$(“editForm”).elements[“end_date”].getValue());
});

this way i am able to set values to fields inside of editForm prior to display

Try the following:

$$("scheduler").$$("views").attachEvent("onViewChange",function(view1,view2){ if($$("scheduler").innerId(view2) == "form"){ // your code here } })

this way i am able to set values to fields inside of editForm prior to display

Please check the following post viewtopic.php?f=24&t=32998&start=0