Finished the JS for the dynamic Form