Implement submit button handler.