How to pre-fill your booking form using URL parameters?
Have you ever wanted to make the booking process smoother for your clients by pre-filling the booking form with their details? With Calendesk, you can easily pass data through URL parameters to achieve just that! This feature is especially handy when you’re directing clients from emails, newsletters, or other websites directly to your booking page. Here’s how to use it effectively:
What Are URL Parameters?
URL parameters are extra bits of information added to the end of a URL. They are typically used to send data to the web page the user is visiting. For example, you might see a URL like this:
https://yourcompany.calendesk.net/book?name=John&surname=Doe&email=johndoe@example.com
In this URL, name, surname, and email are parameters that tell the booking form to pre-fill these fields with the values “John”, “Doe”, and “johndoe@example.com”.
How to Use URL Parameters with Your Calendesk Booking Form
To use URL parameters with your Calendesk booking form, simply add them to the end of your booking page’s URL. Here are the steps:
- Identify the Fields: Determine which fields you want to pre-fill (e.g., name, email).
- Create the URL: Add each field as a parameter to the end of your booking form’s URL, followed by an equals sign and the value you want to pre-fill. Separate each parameter with an & symbol.
- Examples. Here are some examples of how you might use URL parameters:
- To pre-fill the name and surname:
https://yourcompany.calendesk.net/book?name=John&surname=Doe
- To pre-fill the email and phone number:
https://yourcompany.calendesk.com/book?email=johndoe@example.com&phone=48500111222
- To pre-fill the name and surname:
Available parameters
When utilizing URL parameters to pre-fill your Calendesk booking form, each parameter corresponds to a specific field in the form. Below is a list of common parameters you might use, along with their explanations:
name
– Pre-fills the first name field.- Example:
?name=John
- Explanation: Sets the first name in the booking form to “John”.
- Example:
surname
– Pre-fills the surname or last name field.- Example:
?surname=Doe
- Explanation: Sets the surname in the booking form to “Doe”.
- Example:
email
– Pre-fills the email address field.- Example:
?email=johndoe@example.com
- Explanation: Sets the email in the booking form to “johndoe@example.com“.
- Example:
phone
– Pre-fills the phone number field.- Example:
?phone=48500111222
- Explanation: Sets the phone number in the booking form to “48500111222” (it should start with the country code, you can skip the “+” character).
- Example:
companyName
– Pre-fills the company name field.- Example:
?companyName=Acme%20Corp
- Explanation: Sets the company name in the booking form to “Acme Corp”.
- Example:
companyVatIsoPrefix
– Pre-fills the company VAT ISO prefix.- Example:
?companyVatIsoPrefix=us
- Explanation: Sets the company VAT ISO prefix in the booking form to “US”.
- Example:
companyTaxNumber
– Pre-fills the company tax number field.- Example:
?companyTaxNumber=123456789
- Explanation: Sets the company tax number in the booking form to “123456789”.
- Example:
companyStreet
– Pre-fills the company street address field.- Example:
?companyStreet=123%20Main%20St
- Explanation: Sets the company street address in the booking form to “123 Main St”.
- Example:
companyPostalCode
– Pre-fills the company postal code field.- Example:
?companyPostalCode=90001
- Explanation: Sets the company postal code in the booking form to “90001”.
- Example:
companyCity
– Pre-fills the company city field.- Example:
?companyCity=Los%20Angeles
- Explanation: Sets the company city in the booking form to “Los Angeles”.
- Example:
companyCountryIsoCode
– Pre-fills the company country ISO code field.- Example:
?companyCountryIsoCode=us
- Explanation: Sets the company country ISO code in the booking form to United States.
- Example:
Tips for Using URL Parameters
Privacy: Be cautious when using sensitive information in URL parameters, as URLs can be saved in browser history or server logs.
Encoding: If the values you wish to pass contain special characters (like spaces), they need to be encoded (e.g., a space becomes %20).
Pre-filling booking forms using URL parameters can significantly enhance the user experience by making the booking process faster and more convenient. With Calendesk, implementing this feature is straightforward and can be a great way to personalize the booking experience for your clients. Remember to test your URLs before sharing them to ensure they work as expected.