Added some events to the form element