Update sendForm to output JSON