In the jQuery file, fixed the map function so that it now maps over all the input fields and stores each val into an array