gets names of fields from boxes and stores in an arraylist