create form processing for passing data to segment