Yes, in the reservation form layout window, at the bottom you'll see a button called
Automatic updates of form items. This will take you to a page which lets you define rules which will update reservation form fields automatically, based on other reservation form items. The automatic updates are defined by creating update rules.
On top of the page you start by making sure you've selected the correct resource. Note that you'll only see the resources which use a custom reservation form. In case the resource you want to work with using the global form, simply choose the value
All resources in which case also the automatic updates configured will apply to all resources using the global form.
First you set the 'trigger' which is the condition that must be fulfilled in order for the automatic update to take place. This can be a specific form item having a specific value, a range of values (comma-separated or defined as a range), or a special condition, such as
always true or
always true for moderators which means the update rule will always be activated or always for a specific user group (moderators or customers). Please note that besides a single value chosen for the trigger value you can also specify multiple values by listing them separated by comma (e.g. A, B, C), using the greater-than and less-than characters (e.g. <10) or numeric ranges (e.g. from 8 to 12). You can also define a rule based on a weekday -- simply select the
date or
start date field and enter the weekday or comma-separated weekdays which trigger the update based on the weekday selected.
If a single trigger field should control multiple dependent fields, you'll need to add multiple rules, each one having the same trigger item and value.
Besides the trigger, you must also define a dependent item which is a field which will be updated when the rule is activated. You can select a specific value in a field and/or you can also hide the field. For dependent items which are dropdowns, you can specify comma-separated values (in
dependent value) which will change the possible items to the listed ones, and the first one will be selected. If you want to limit the choice in a dependent drop-down to a single item, you must still include a comma after the value, e.g. "A," would limit the choice to just "A" removing all other choices. You can also use a special syntax:
V1:Text1, V2:Text2, V3:Text3 ... which will populate the dropdown with choices V1, V2 and V3 while giving them user-friendly texts: Text1, Text2, Text3.
Note that if you have at least one checkbox in your reservation form, you'll see an extra item called
Extra condition. This allows you to switch the rule on or off depending on whether the checkbox specified in this field is checked or not.
Example 1: setting start hour and rental duration based on period selection (morning, afternoon, full day)
You take bookings for specific time slots which are of different durations, e.g. mornings (9am-12am), afternoons (2pm-6pm) or whole day (9am-6pm). You could normally give the customer a choice of start time (9am or 2pm) and duration (3 hours, 4 hours or 7 hours) -- this configuration must be done in resource settings. This would be however confusing for the customer to know which duration can be used with which start time. This is where the automatic updates feature is very useful. Based on existing fields (start time and duration), we can define a new drop-down field called e.g. appointment time with the following values: morning, afternoon and whole day. Then, we must go to the automatic updates page and specify the following rules:
Trigger item | Trigger value | Dependent item | Dependent value |
Appointment time | morning | Start time | 9am |
Appointment time | morning | Duration | 3 hours |
Appointment time | afternoon | Start time | 2pm |
Appointment time | afternoon | Duration | 4 hours |
Appointment time | whole day | Start time | 9am |
Appointment time | whole day | Duration | 7 hours |
Now, you can also hide the original fields (start time and duration) and let the user make a choice of both duration and the start time using a single drop-down choice. The other two fields will be updated automatically using javascript.
Note:
See Q342 for a much more complete breakdown of this scenario which also includes the steps needed to configure the resource's time related settings, the form items and also pricing (depending on the duration chosen and possibly other conditions such as the weekday).
Example 2: setting possible start times based on chosen weekday
If you have fixed start times, you can list them in resource settings (time-related settings) but if the start times depend on the weekday, then you'll need to use automatic update rules. In our example, monday-friday rentals can start at 9:00, 10:30, 12:00 and saturday rentals can start at 12:00 or 13:30. First, you'll need to list all possible times in time-related settings (9:00, 10:30, 12:00, 13:30), then you'll need to set the following rules:
Trigger item | Trigger value | Dependent item | Dependent value |
Date | Monday,Tuesday,Wednesday,Thursday,Friday | Start time | 9:00, 10:30, 12:00 |
Date | Saturday | Start time | 12:00, 13:30 |
Note:
See Q355 for a detailed description of this scenario and also for an alternative solution.
Example 3: copy personal details to the first participant section
If you're using a per-participant section in order to collect personal data for each participant, you may want to avoid having the customer enter their personal data twice: as the customer associated with the reservation (standard first/last name, email address fields etc.) and as the first participant. The following solution uses a checkbox 'First participant details same as above' which, when selected, prefills the first/last name and email fields in the per-person section. In order to configure this functionality, you'll need to add the following rules:
Trigger item | Trigger value | Dependent item | Dependent value | Extra condition |
First name | * | Participant first name (first person) | $(value) | First participant details same as above |
Last name | * | Participant last name (first person) | $(value) | First participant details same as above |
Email | * | Participant email (first person) | $(value) | First participant details same as above |
Note that the dependent item must be set to the "first person" version of the fields so that the rule copies the details only to the first person's section and not all of them.