Files
Escapepage/templates/website/contact.html.twig
T
Frank 6fb3ed597b Add contact form with reCAPTCHA, saved to DB, viewable in admin
Adds a public /contact page (name/email/message, protected by the same
reCAPTCHA v3 setup used on registration) that persists submissions to
a new contact_message table, plus a Contact section in the admin panel
to read them. Linked from the site footer.
2026-08-29 11:11:06 +02:00

32 lines
1.0 KiB
Twig

{% extends 'layout/site.html.twig' %}
{% block title %}Contact | {{ 'site.name'|trans }}{% endblock %}
{% block body %}
<div class="row justify-content-center">
<div class="col-lg-7">
<div class="text-center mb-4">
<h1 class="display-6 fw-bold">Contact</h1>
<p class="lead text-secondary">Got a question, a bug to report, or just want to say hi?</p>
</div>
<div class="card shadow-sm">
<div class="card-body">
{{ form_errors(contactForm) }}
{{ form_start(contactForm) }}
{{ form_row(contactForm.name) }}
{{ form_row(contactForm.email) }}
{{ form_row(contactForm.message) }}
{{ form_row(contactForm.captcha) }}
<div class="d-grid mt-3">
<button type="submit" class="btn btn-primary">Send Message</button>
</div>
{{ form_end(contactForm) }}
</div>
</div>
</div>
</div>
{% endblock %}