How do I filter resources or options in booking forms?
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.
TL;DR
For most cases: select specific resources in the booking form settings (Resources / Who). For region/skill routing: use separate forms per segment. For dynamic filtering: use bookingForm.setCalendarResources([id1, id2]) in JS, or append ?calendar_resources=id1,id2 to the form URL.
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,552 to 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
Common searches
filter resources booking form • limit resources • calendar_resources url param • resource weight • setCalendarResources • restrict booking to region • which technician gets booked
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article