Compare commits

...

2 Commits

2 changed files with 54 additions and 2 deletions

View File

@ -24,3 +24,9 @@ document.addEventListener("DOMContentLoaded", function() {
});
});
});
// Für Patenshop
document.getElementById('donationForm').addEventListener('submit', function(event) {
event.preventDefault(); // Verhindert die tatsächliche Formularübermittlung
alert('Alles in Ordnung. Vielen Dank für Ihre Spende!');
this.reset(); // Setzt das Formular zurück
});

View File

@ -86,8 +86,54 @@
<!-- Patenshop Section -->
<section>
<h1>Patenshop</h1>
<p>Patenshop</p>
<div class="container mt-5">
<h2>Spendenformular</h2>
<form id="donationForm">
<div class="mb-3">
<label for="firstName" class="form-label">Name</label>
<input type="text" class="form-control" id="firstName" required>
</div>
<div class="mb-3">
<label for="lastName" class="form-label">Nachname</label>
<input type="text" class="form-control" id="lastName" required>
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" class="form-control" id="email" required>
</div>
<div class="mb-3">
<label for="bankDetails" class="form-label">Bankverbindung</label>
<input type="text" class="form-control" id="bankDetails" required>
</div>
<div class="mb-3">
<label for="comment" class="form-label">Kommentarfeld</label>
<textarea class="form-control" id="comment" rows="3"></textarea>
</div>
<div class="mb-3">
<label for="itemSelect" class="form-label">Verpflegungsartikel</label>
<select class="form-select" id="itemSelect" required>
<option value="">Bitte wählen</option>
<option value="Heu">Heu</option>
<option value="Körner">Körner</option>
<option value="Nüsse">Nüsse</option>
<option value="Obst">Obst</option>
<option value="Gemüse">Gemüse</option>
</select>
</div>
<div class="mb-3">
<label for="quantitySelect" class="form-label">Mengeneinheit</label>
<select class="form-select" id="quantitySelect" required>
<option value="">Bitte wählen</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div>
<button type="submit" class="btn btn-primary">Spenden</button>
</form>
</div>
</section>
<!-- Footer -->