FAQ Q325: How can I create a link to the reservation form with a pre-filled item?

Using the settings in the backend

First of all, you can of course always define the default value for any form item in Reservation form layout.

The special field types which you may want to preset are the country and phone country code fields -- they are by default prefilled based on the IP address of the visitor. You can however enter a fixed value if most of your customers come from a single country. E.g. enter 1 in the phone/mobile phone fields for US/Canada (49 for Germany etc.). Enter the 2-character ISO code for the country field, e.g. US for the US, DE for Germany etc.

Using URL parameters

If, however, you want to create a special direct link to the reservation form with some values prefilled, you can use the parameter rental_prop_xxx=yyy in the link, where xxx is the name of the form item (with underscores instead of spaces and other special characters) and yyy is the value to be prefilled.

Here's an example:

You can see what the parameter will look like by looking at tag in the last column. Instead of the prop_ prefix, use rental_prop_, for example:

https://www.planyo.com/booking.php?mode=reserve&resource_id=[your resource ID]&rental_prop_persons=3

This URL will prefill the field called persons to the value of 3. The link above points to simple integration but you can use the same parameter with advanced integration (your own domain name instead of planyo.com).

Date and time fields

The date field parameters are called start_date and end_date if you have two of. them or one_date if there's just one on your reservation form (note: you can find out the name of each field by examining the names of reservation form fields with a browser extension such as developer tools for Chrome). You can preset the date to a fixed value such as 2020-01-02 or you can use the special values today and tomorrow.

The time field parameters are called start_time (and end_time if you have two of them). You can preset them by using the formula: hour + minute / 60, e.g. 14 means 2pm (14:00), 14.25 means 14:15 and 14.5 means 14:30. You can also use the special values prev (previous time slot before the current time) and next (next time slot after the current time).

Using attribute string

If you don't want to pass the prefilled values in the URL but they should be hard-coded in the planyo plugin on your webpage (or dynamically calculated using server-side or client-side language), them place them in the attribute string in the same format as the URL parameters (name1=value1&name2=value2...).
Back to Frequently Asked Questions