# How to add a button that pre-fills a meeting location in the booking form

URL: https://help.hubhus.com/kb/how-to-add-a-button-that-pre-fills-a-meeting-location-in-the-booking-form
Category: Calendar and booking / Booking forms
Updated: 2026-09-28T14:40:35.842+00:00

Summary: 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

1. Open your booking form and go to **Form Part 1** (or create/edit an HTML component for reuse across forms).
2. 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>
```

3. Save and test. Click the button on the public form and confirm the address field is filled and the location block is visible.

**HTML component:** use `<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.

## Related articles

- https://help.hubhus.com/kb/creating-and-managing-booking-forms
- https://help.hubhus.com/kb/how-do-i-customize-booking-form-fields
- https://help.hubhus.com/kb/how-do-i-configure-booking-form-error-and-info-messages
- https://help.hubhus.com/kb/how-do-i-customize-the-look-and-feel-of-booking-forms
