Move handler for form submit to form view