added ajax call to post the addform data to /api/add