added form data to json logic