No description
| .gitignore | ||
| app.py | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Forwarder Contact Form
Quick HTML example:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Contact</title>
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
</head>
<body>
<form method="POST" action="https://foo.bar/contact">
<label>
Name
<input type="text" name="name" required />
</label>
<label>
Email
<input type="email" name="email" required />
</label>
<label>
Message
<textarea name="message" rows="6" required></textarea>
</label>
<!-- Redirect here when submission succeeds -->
<input type="hidden" name="_on_success" value="https://foo.bar/thanks" />
<!-- Redirect here when submission fails (adds ?error=...) -->
<input type="hidden" name="_on_fail" value="https://foo.bar/contact-error" />
<!-- Cloudflare Turnstile widget -->
<div class="cf-turnstile" data-sitekey="0x4AAAAAACcfLYFqR0_qO70U"></div>
<button type="submit">Send</button>
</form>
</body>
</html>
Notes:
- You can add any extra fields; the backend forwards all non-special fields to Discord.
- Special fields are
_on_success,_on_fail, and the Turnstile token (cf-turnstile-response).