Added updated RSVP-form

This commit is contained in:
spetznas
2026-05-16 22:22:24 +02:00
parent b7ad462786
commit 838dabccca
11 changed files with 293 additions and 49 deletions
+8
View File
@@ -14,6 +14,14 @@ rsvp_title = "RSVP"
rsvp_deadline = "Bitte antworten bis"
rsvp_email = "E-Mail"
rsvp_form = "RSVP Formular"
rsvp_firstname = "Vorname"
rsvp_lastname = "Nachname"
rsvp_drinks = "Getränkevorlieben"
rsvp_drinks_wine = "Wein"
rsvp_drinks_beer = "Bier"
rsvp_drinks_juice = "Saft"
rsvp_allergies = "Allergisch auf"
rsvp_send = "Abschicken"
details_title = "Details"
footer_message = "Wir freuen uns darauf, mit euch zu feiern ❤️"
big_day = "Der große Tag ist da!"
+8
View File
@@ -14,6 +14,14 @@ rsvp_title = "RSVP"
rsvp_deadline = "Please respond by"
rsvp_email = "Email"
rsvp_form = "RSVP Form"
rsvp_firstname = "First name"
rsvp_lastname = "Last name"
rsvp_drinks = "Drink preferences:"
rsvp_drinks_wine = "Wine"
rsvp_drinks_beer = "Beer"
rsvp_drinks_juice = "Juice"
rsvp_allergies = "Allergic to"
rsvp_send = "Send"
details_title = "Details"
footer_message = "We look forward to celebrating with you ❤️"
big_day = "The big day is here!"
+8
View File
@@ -14,6 +14,14 @@ rsvp_title = "RSVP"
rsvp_deadline = "Пожалуйста, ответьте до"
rsvp_email = "Электронная почта"
rsvp_form = "Форма RSVP"
rsvp_firstname = "Имя"
rsvp_lastname = "Фамилия"
rsvp_drinks = "Предпочтения по напиткам:"
rsvp_drinks_wine = "Вино"
rsvp_drinks_beer = "Пиво"
rsvp_drinks_juice = "Сок"
rsvp_allergies = "Аллергия на"
rsvp_send = "Отправить"
details_title = "Детали"
footer_message = "❤️ Мы с нетерпением ждем встречи с вами ❤️"
big_day = "Наступил великий день!"
+45 -9
View File
@@ -139,20 +139,56 @@ body {
</div>
{{ end }}
<!-- RSVP -->
<div class="section rsvp">
<!-- <!-1- RSVP -1-> -->
<!-- <div class="section rsvp"> -->
<!-- <h2>📝 {{ i18n "rsvp_title" }}</h2> -->
<!-- {{ with .Params.rsvp.deadline }} -->
<!-- <p>{{ i18n "rsvp_deadline" }} <strong>{{ . }}</strong>.</p> -->
<!-- {{ end }} -->
<!-- {{ with .Params.rsvp.email }} -->
<!-- <p>{{ i18n "rsvp_email" }}: <a href="mailto:{{ . }}">{{ . }}</a></p> -->
<!-- {{ end }} -->
<!-- {{ with .Params.rsvp.form }} -->
<!-- <p><a href="{{ . }}" target="_blank">{{ i18n "rsvp_form" }}</a></p> -->
<!-- {{ end }} -->
<!-- </div> -->
<!-- RSVP -->
<div class="section rsvp">
<h2>📝 {{ i18n "rsvp_title" }}</h2>
{{ with .Params.rsvp.deadline }}
<p>{{ i18n "rsvp_deadline" }} <strong>{{ . }}</strong>.</p>
{{ end }}
{{ with .Params.rsvp.email }}
<p>{{ i18n "rsvp_email" }}: <a href="mailto:{{ . }}">{{ . }}</a></p>
{{ end }}
{{ with .Params.rsvp.form }}
<p><a href="{{ . }}" target="_blank">{{ i18n "rsvp_form" }}</a></p>
{{ end }}
</div>
<!-- RSVP Form -->
<form action="/rsvp-submit.php" method="POST">
<label for="first_name">{{ i18n "rsvp_firstname" }}:</label><br>
<input type="text" id="first_name" name="first_name" required><br><br>
<label for="last_name">{{ i18n "rsvp_lastname" }}:</label><br>
<input type="text" id="last_name" name="last_name" required><br><br>
<label>{{ i18n "rsvp_drinks" }}:</label><br>
<input type="checkbox" id="wine" name="drinks[]" value="Wine">
<label for="wine">{{ i18n "rsvp_drinks_wine" }}</label><br>
<input type="checkbox" id="beer" name="drinks[]" value="Beer">
<label for="beer">{{ i18n "rsvp_drinks_beer" }}</label><br>
<input type="checkbox" id="juice" name="drinks[]" value="Juice">
<label for="juice">{{ i18n "rsvp_drinks_juice" }}</label><br><br>
<label for="allergies">{{ i18n "rsvp_allergies" }}:</label><br>
<input type="text" id="allergies" name="allergies"><br><br>
<!-- optional but recommended: helps prevent spam bots -->
<input type="text" name="website" style="display:none">
<button type="submit">{{ i18n "rsvp_send" }}</button>
</form>
</div>
<!-- Extra Info -->
{{ with .Params.details }}
<div class="section">
+2 -2
View File
@@ -137,14 +137,14 @@
<li class="navigation-item">
<a href="/ru/categories/">🇷🇺</a>
<a href="/de/categories/">🇩🇪</a>
</li>
<li class="navigation-item">
<a href="/de/categories/">🇩🇪</a>
<a href="/ru/categories/">🇷🇺</a>
</li>
+39 -3
View File
@@ -371,17 +371,53 @@ btn.addEventListener("click", async () => {
<div class="section rsvp">
<div class="section rsvp">
<h2>📝 RSVP</h2>
<p>Bitte antworten bis <strong>30. Juni</strong>.</p>
<p><a href="https://example.com/rsvp-form" target="_blank">RSVP Formular</a></p>
<form action="/rsvp-submit.php" method="POST">
</div>
<label for="first_name">Vorname:</label><br>
<input type="text" id="first_name" name="first_name" required><br><br>
<label for="last_name">Nachname:</label><br>
<input type="text" id="last_name" name="last_name" required><br><br>
<label>Getränkevorlieben:</label><br>
<input type="checkbox" id="wine" name="drinks[]" value="Wine">
<label for="wine">Wein</label><br>
<input type="checkbox" id="beer" name="drinks[]" value="Beer">
<label for="beer">Bier</label><br>
<input type="checkbox" id="juice" name="drinks[]" value="Juice">
<label for="juice">Saft</label><br><br>
<label for="allergies">Allergisch auf:</label><br>
<input type="text" id="allergies" name="allergies"><br><br>
<input type="text" name="website" style="display:none">
<button type="submit">Abschicken</button>
</form>
</div>
+4 -4
View File
@@ -22,13 +22,13 @@
<loc>http://localhost:1313/categories/</loc>
<xhtml:link
rel="alternate"
hreflang="ru"
href="http://localhost:1313/ru/categories/"
hreflang="de"
href="http://localhost:1313/de/categories/"
/>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://localhost:1313/de/categories/"
hreflang="ru"
href="http://localhost:1313/ru/categories/"
/>
<xhtml:link
rel="alternate"
+39 -3
View File
@@ -371,17 +371,53 @@ btn.addEventListener("click", async () => {
<div class="section rsvp">
<div class="section rsvp">
<h2>📝 RSVP</h2>
<p>Please respond by <strong>June 30</strong>.</p>
<p><a href="https://example.com/rsvp-form" target="_blank">RSVP Form</a></p>
<form action="/rsvp-submit.php" method="POST">
</div>
<label for="first_name">First name:</label><br>
<input type="text" id="first_name" name="first_name" required><br><br>
<label for="last_name">Last name:</label><br>
<input type="text" id="last_name" name="last_name" required><br><br>
<label>Drink preferences::</label><br>
<input type="checkbox" id="wine" name="drinks[]" value="Wine">
<label for="wine">Wine</label><br>
<input type="checkbox" id="beer" name="drinks[]" value="Beer">
<label for="beer">Beer</label><br>
<input type="checkbox" id="juice" name="drinks[]" value="Juice">
<label for="juice">Juice</label><br><br>
<label for="allergies">Allergic to:</label><br>
<input type="text" id="allergies" name="allergies"><br><br>
<input type="text" name="website" style="display:none">
<button type="submit">Send</button>
</form>
</div>
+38
View File
@@ -0,0 +1,38 @@
<?php
if ($_SERVER["REQUEST_METHOD"] !== "POST") {
exit("Invalid request");
}
/* Honeypot spam protection */
if (!empty($_POST['website'])) {
exit; // silently drop bot submission
}
/* Safely read form fields */
$first_name = htmlspecialchars($_POST['first_name'] ?? '');
$last_name = htmlspecialchars($_POST['last_name'] ?? '');
$drinks = isset($_POST['drinks']) ? implode(", ", $_POST['drinks']) : "None";
$allergies = htmlspecialchars($_POST['allergies'] ?? '');
if (!$first_name || !$last_name) {
exit("Missing required fields");
}
/* Email setup */
$to = "hochzeit@markinstefan.xyz";
$subject = "New Wedding RSVP from $first_name $last_name";
$message = "Name: $first_name $last_name\n";
$message .= "Drinks: $drinks\n";
$message .= "Allergies: $allergies\n";
$headers = "From: no-reply@yourdomain.com\r\n";
$headers .= "Reply-To: no-reply@yourdomain.com\r\n";
/* Send mail */
mail($to, $subject, $message, $headers);
echo "Thank you! Your RSVP has been sent.";
?>
+39 -3
View File
@@ -371,17 +371,53 @@ btn.addEventListener("click", async () => {
<div class="section rsvp">
<div class="section rsvp">
<h2>📝 RSVP</h2>
<p>Пожалуйста, ответьте до <strong>30 июня</strong>.</p>
<p><a href="https://example.com/rsvp-form" target="_blank">Форма RSVP</a></p>
<form action="/rsvp-submit.php" method="POST">
</div>
<label for="first_name">Имя:</label><br>
<input type="text" id="first_name" name="first_name" required><br><br>
<label for="last_name">Фамилия:</label><br>
<input type="text" id="last_name" name="last_name" required><br><br>
<label>Предпочтения по напиткам::</label><br>
<input type="checkbox" id="wine" name="drinks[]" value="Wine">
<label for="wine">Вино</label><br>
<input type="checkbox" id="beer" name="drinks[]" value="Beer">
<label for="beer">Пиво</label><br>
<input type="checkbox" id="juice" name="drinks[]" value="Juice">
<label for="juice">Сок</label><br><br>
<label for="allergies">Аллергия на:</label><br>
<input type="text" id="allergies" name="allergies"><br><br>
<input type="text" name="website" style="display:none">
<button type="submit">Отправить</button>
</form>
</div>
+38
View File
@@ -0,0 +1,38 @@
<?php
if ($_SERVER["REQUEST_METHOD"] !== "POST") {
exit("Invalid request");
}
/* Honeypot spam protection */
if (!empty($_POST['website'])) {
exit; // silently drop bot submission
}
/* Safely read form fields */
$first_name = htmlspecialchars($_POST['first_name'] ?? '');
$last_name = htmlspecialchars($_POST['last_name'] ?? '');
$drinks = isset($_POST['drinks']) ? implode(", ", $_POST['drinks']) : "None";
$allergies = htmlspecialchars($_POST['allergies'] ?? '');
if (!$first_name || !$last_name) {
exit("Missing required fields");
}
/* Email setup */
$to = "hochzeit@markinstefan.xyz";
$subject = "New Wedding RSVP from $first_name $last_name";
$message = "Name: $first_name $last_name\n";
$message .= "Drinks: $drinks\n";
$message .= "Allergies: $allergies\n";
$headers = "From: no-reply@yourdomain.com\r\n";
$headers .= "Reply-To: no-reply@yourdomain.com\r\n";
/* Send mail */
mail($to, $subject, $message, $headers);
echo "Thank you! Your RSVP has been sent.";
?>