GET A CALLBACK
<script>
const id = 'telegram_form' /* ID on Form element */
const req = new XMLHttpRequest()
req.onload = event => {
console.log(event.statusText)
}
window.addEventListener('DOMContentLoaded', event => {
const form = document.getElementById(id)
console.log(id, form)
form.addEventListener('submit', event => {
console.log(id, 'onsubmit')
req.open('POST', 'https://fluid.fyi/external_files/wf_to_tg/send.php', false) /* your link to file */
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
req.send(new URLSearchParams(new FormData(event.target)))
console.log(id, event.target)
})
})
</script>
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.