FAQ Q388: How to restrict start and end hours to specific hours only?
The start hours can be easily limited in
resource settings / time related settings in
Restrict starting times. Here you should enter comma-separated possible start hours, such as: 8:15, 9:30, 13:45.
There is no setting which similarly would limit end hours. You have two possibilities to solve this:
- Change your reservation form so the customer chooses the start hour and duration instead of start hour and end hour. See Q228 for more about this. This solution works best if your possible end hours correspond to restricted start hours and a fixed duration.
- If you want the customer to choose start/end hour from a dropdown, you'll need to go to Automatic updates of form items and add a single rule:
Trigger item: set this to Always true
Dependent item: set to End time
Dependent value: switch to Text and set the value to comma-separated list of possible end times. Note that these end times must be already amongst the listed choices, so they must be compatible with the options from time-related settings. An example would be: 12:00, 15:30
This solution uses the capability of automatic updates of form items to automatically update a value (or possible drop-down values) based on another form item. In this case we set the trigger to always true which means that the update will be always applied, independent of any other items.