Implements behaviour of the cancel button on Form.FormWrapper