Calendar and booking / Booking forms
How to add a button that pre-fills a meeting location in the booking form
Published 28. sep. 2026, 16.03
TL;DR
Create a button with onclick="selectOfficeLocation()" . The JS function calls $('.dawa-address').val('your address').trigger('input').trigger('change').trigger('blur') and shows #location_div . Place the code in Form Part 1 or an HTML component for reuse.
Give customers a one-click shortcut to book at your office, showroom, or any fixed meeting point. A button fills the address field automatically - no typing, no DAWA search needed.
Get started in 3 steps
- Open your booking form and go to Form Part 1 (or create/edit an HTML component for reuse across forms).
- Paste the button and script below. Replace the address string with your own. Optionally set extra field values (e.g. toggle a phone-meeting flag):
<button type="button" onclick="selectOfficeLocation()">Book a meeting at our office</button> <script> function selectOfficeLocation() { $('.dawa-address').val('Your Street 1, 1234 City').trigger('input').trigger('change').trigger('blur'); $('#location_div').show(); } </script> - Save and test. Click the button on the public form and confirm the address field is filled and the location block is visible.
<hh-html.office-booking-button /> to embed across multiple forms ·
Multiple locations: duplicate the button and function with different addresses
Read more
How it works
.dawa-address- the address input used by Hubhus' DAWA/geo lookup..trigger('input').trigger('change').trigger('blur')- all three are needed so the DAWA lookup validates and resolves the address immediately.location_div- Hubhus may hide this block dynamically; explicitly setting it to visible ensures the address section appears.- Optional extra field (e.g.
#telefonmoede) - adapts related form fields to the chosen location context.
When to use this pattern
- You offer meetings at your office, showroom, or a fixed meeting point.
- You want faster booking for standard scenarios without requiring the customer to type an address.
- You have multiple fixed locations - duplicate button and function for each.
- You need to toggle additional form fields depending on the selected location type.
button
prefill
location
Didn't find the answer? Submit a ticket and we'll get back to you as soon as possible.