Calendar and booking / Booking forms
How do I filter resources or options in booking forms?
Published 28. sep. 2026, 16.03
TL;DR
Not every form should show every resource. You can limit which technicians, teams, or assets are bookable - by static selection, geographic rules, or dynamically via JavaScript or URL parameters. This is how you make sure the right resource gets booked every time.
4 ways to filter resources
- Static selection (most common). In the booking form under Resources / Who, choose exactly which calendar resources are allowed. Decide if customers can pick a resource, or if Hubhus auto-assigns. This covers the majority of use cases.
- Tag-based routing (recommended for scaling). Use resource tags (region, skill, team) and create separate booking forms per segment. Example: "Form - Region West" selects only Region West resources. Keeps each form simple and avoids complex conditional logic.
- Location/transit rules. In the form's Location & transport settings, configure bookable postal codes, max driving from base, and max driving between events. Resources outside the customer's area are automatically excluded - no manual filtering needed.
- Dynamic JS or URL override (advanced). Use
bookingForm.setCalendarResources([{id: 534, weight: 30}, {id: 552}])in the form's JavaScript, or append?calendar_resources=534,552to the URL. IDs must be a subset of those already selected in the form settings.
Read more
Weights and prioritization
When multiple resources are available, Hubhus selects based on: totalWeight = resourceWeight - transitMinutes
A higher resource weight makes that resource more likely to be chosen - even if transit is slightly longer. Useful to prefer specific team members or deprioritize backup resources.
Set weight in JS: bookingForm.setCalendarResources([{id: 534, weight: 30}]). Get current resources and adjust: var r = bookingForm.getCalendarResources(); r[0].weight = 30; bookingForm.setCalendarResources(r);
Debugging resource selection
Two placeholders help verify which resources are active during testing:
%calendar_resources_as_pretty_json%- all statically defined resources and their IDs%booking_bookable_resources_as_pretty_json%- resources currently in use (after JS/URL filters). Place in Part 3 while testing, remove before going live.
Form messages for filtered/blocked bookings
When filtering excludes a customer's address, configure clear Form messages so customers understand why:
- Unsupported postal code
- Address too far away
- No available times in the allowed date window