updated onclick function for save button - food data accessible from submit()