Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrkdevelopment/e9f0a048b707839fb927325b87755ebf to your computer and use it in GitHub Desktop.
Save mrkdevelopment/e9f0a048b707839fb927325b87755ebf to your computer and use it in GitHub Desktop.
<div id="gform_123_vars">.
<script type="module"
data-xq-forms="gfrom_123"//ID
data-xq-enc="html"
data-xq-format="raw"
data-xq-action="https://our.server.coml/t/form/encryptedmail"
data-xq-api="9-4e10b813ecc8-a9a316bc-d5694ec-a9ecd26c77c6"
data-xq-success="callbackfunction()">
</script>
<script>
callbackfunction(){
alert();
document.getElementById("app-success").innerHTML = 'Yep, worked';
window.location = "https://host.coml/thank-you.html";
});
document.addEventListener("xq_error", function (error) {
document.getElementById("app-error").innerHTML = error.detail;
console.error(error.detail);
});
</script>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment