added cancel-edit and cancel-create functions, updated form behavior