mirror of
https://github.com/Alvin-Zilverstand/Spik-en-span.git
synced 2026-03-06 13:26:49 +01:00
updae
This commit is contained in:
@@ -6,15 +6,15 @@ document.getElementById('ticketForm').addEventListener('submit', function (e) {
|
||||
const category = document.getElementById('ticketCategory').value;
|
||||
const quantity = document.getElementById('ticketQuantity').value;
|
||||
|
||||
// Generate a unique ticket ID (for simplicity, using timestamp)
|
||||
|
||||
const ticketId = `TICKET-${Date.now()}`;
|
||||
|
||||
// Generate QR code content
|
||||
|
||||
const qrContent = `Name: ${name}, Email: ${email}, Category: ${category}, Quantity: ${quantity}, Ticket ID: ${ticketId}`;
|
||||
|
||||
// Display QR code (using a library like QRCode.js)
|
||||
|
||||
const qrCodeContainer = document.getElementById('qrCodeContainer');
|
||||
qrCodeContainer.innerHTML = ''; // Clear previous QR code
|
||||
qrCodeContainer.innerHTML = '';
|
||||
const qrCode = new QRCode(qrCodeContainer, {
|
||||
text: qrContent,
|
||||
width: 200,
|
||||
|
||||
Reference in New Issue
Block a user