If you want your users to have pre-filled Data on Townscript's forms.

For users registering using Townscript.com

Below is the format for sending the Pre-filled data to Townscript booking page -

https://www.townscript.com/v2/e/<event-code>/booking?td-<ticket-name>=<ticket-quantity>&name=<attendee-name>&emailid=<attendee-emailid>&discountcode=<discount-code>&cq<custom-question-number>=<answer-for-custom-question>

Here , , , , , , are the parameters, which should be replaced by actual values.

TICKET SELECTION
td-=
td- prefix should be added with exact ticket name and selection quantity should be passed in place of

ATTENDEE BASIC DETAILS
emailId= should be replaced by desired email
name=
OR
If collecting name as First Name , Last Name please use
firstname=
lastname=

FORM QUESTIONS
cq<custom-question-number> can be Custom Question of type Text, Contact No., Text Area, Date, Select, Radio, Multiple Choice Checkbox.
ex:
cq6** for Custom Question 6th as per sequence in the booking flow.

Answer for Custom Question formats:
Date String format should be DD-MM-YYYY
Multiple Choice checkbox Answers should exact selections with "," separated.
All other Answer should be exact the same as how you want with Case sensitivity

NOTE :
Validate data for same before hitting our servers.
Parameters are Case Sensitive
Data for only First attendee can be pre-filled

Example 1 :-
Selecting 2 tickets ticket-name-1 and ticket-name-2 with quantity 5 and 6 respectively.
Name of attendee - John Dave
Email of attendee - [email protected]

https://www.townscript.com/v2/e/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&name=John Dave&[email protected]

If Name Split setting used
First Name - John
Last Name - Dave

https://www.townscript.com/v2/e/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&firstname=John&lastname=Dave&[email protected]

Example 2:-
Prefilling following attendee information
Name: Mary Diesel
Email: [email protected]
Answer to the first question in attendee view (Contact Info): 11234567890
Answer to the second question in attendee view (City): Mumbai
Answer to the third question in attendee view (Date of Birth): 24-09-1992

https://www.townscript.com/v2/e/<event-code>/booking?cq1=11234567890&cq2=Mumbai&cq3=24-09-1992&name=Mary Diesel&[email protected]

For users registering using Widget on your website.

Sending Attendee's Data and/or Ticket Information and/or Discount to be applied pre-filled

<script>
    function getPreFilledDataTS(){
       // All the fields are optional
        return {
            name: 				"<attendee-name>",
            emailid: 			"<attendee-emailId>",
            discountcode: "<discount-code>",
          	cq1:					"<answer-for-custom-question-1>",
          	cq6:					"<answer-for-custom-question-6>",
            td-ticketname1: <ticket-quantity>,
            td-ticketname2: <ticket-quantity>
        }
    }
</script>
<button onclick="popupWithParams('<event-code>',getPreFilledDataTS());" class="tsbutton">Register Now</button>
<noscript id="tsNoJsMsg">Javascript on your browser is not enabled.</noscript><script src="https://www.townscript.com/static/Bookingflow/js/townscript-widget.nocache.js" type="text/javascript"></script>

Here , , , , , are the parameters, which should be replaced by actual values.

If you wish to not send some information you can just skip that key, value set from your JSON.

Ex: If you wish not to send any Ticket related Info :

<script>
    function getPreFilledDataTS(){
        return {
            name: 				"<attendee-name>",
            emailid: 			"<attendee-emailId>",
            discountcode: "<discount-code>"
        }
    }
</script>
<button onclick="popupWithParams('<event-code>',getPreFilledDataTS());" class="tsbutton">Register Now</button>
<noscript id="tsNoJsMsg">Javascript on your browser is not enabled.</noscript><script src="https://www.townscript.com/static/Bookingflow/js/townscript-widget.nocache.js" type="text/javascript"></script>

NOTE :
Parameters are Case Sensitive
Data for only First attendee can be pre-filled and

Current Limitation: Tickets hidden with access code, can not be increased with autofill.

For users registering using Townscript Iframe

To perform pre-filling data in iframe, you need to generate src of iframe or iframe itself dynamically each time.

Following is the iframe code for reference -

<iframe src="https://www.townscript.com/v2/widget/<event-code>/booking?td-<ticket-name>=<ticket-quantity>&name=<attendee-name>&emailid=<attendee-emailid>&discountcode=<discount-code>&cq<custom-question-number>=<answer-for-custom-question>" frameborder="0" height="600px" width="100%"></iframe>

Eg1:

<iframe src="https://www.townscript.com/v2/widget/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&name=John Dave&[email protected]" frameborder="0" height="600px" width="100%"></iframe>