add form event handler