Formulario de envío de onarización solo una vez

function submit() {
    if (!sessionStorage.getItem("submitted")) {
        console.log("submitting");
        sessionStorage.setItem("submitted", "true");
        document.getElementById("post").submit();
    } else {
        console.log("already submitted, not repeating");
        sessionStorage.removeItem("submitted");
    }
}
Tyagi420