Rewrote form capture with jquery

also removed while loop, made it if/else