Q233: Can reservation form items be updated automatically based on other items?

Vous êtes ici: ibookfishing » Aide » Questions Fréquemment Posées (FAQ) » Q233: Can reservation form items be updated automatically based on other items?
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. 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.

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 itemTrigger valueDependent itemDependent value
Appointment timemorningStart time9am
Appointment timemorningDuration3 hours
Appointment timeafternoonStart time2pm
Appointment timeafternoonDuration4 hours
Appointment timewhole dayStart time9am
Appointment timewhole dayDuration7 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.

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 itemTrigger valueDependent itemDependent value
DateMonday,Tuesday,Wednesday,Thursday,FridayStart time9:00, 10:30, 12:00
DateSaturdayStart time12:00, 13:30