locked
Tickets templates RRS feed

  • Question

  • User-527908287 posted

    Hello Forum, may I please ask how to design event ticket templates on a web form. I want to have different ticket template in a web form on my website where any user can choose, so that when the user chooses a particular template, the user will input data and preview before printing. If there is any tutorial on the coding please I will like to be given a redirection. I need help in achieving this. Thank you

    Saturday, April 25, 2020 12:00 AM

Answers

  • User288213138 posted

    Hi Donald416,

    I want to have different ticket template in a web form on my website where any user can choose, so that when the user chooses a particular template, the user will input data and preview before printing.

    For how to design Ticket templates you can refer to this link:

    https://www.ticketmatic.com/docs/tickets/configure_ticket_sales/ticketlayout/

    About how to preview the design template before printing, you can refer below code:

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:Panel ID="pnlContents" runat="server">
                You can set the Ticket style in here
            </asp:Panel>
            <br />
            <asp:Button ID="btnPrint" runat="server" Text="Print" OnClientClick="return PrintPanel();" />
        </form>
        <script>
            function PrintPanel() {
                var panel = document.getElementById("<%=pnlContents.ClientID %>");
                var printWindow = window.open('', '', 'height=400,width=800');
                printWindow.document.write('<html><head><title>Tickets templates</title>');
                printWindow.document.write('</head><body >');
                printWindow.document.write(panel.innerHTML);
                printWindow.document.write('</body></html>');
                printWindow.document.close();
                setTimeout(function () {
                    printWindow.print();
                }, 5000);
                return false;
            }
        </script>
    </body>
    </html>

    Hope this can help you.

    Best regards,

    Sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, April 25, 2020 3:12 AM