Implement submit functionality.