Text box that does auto complete address

How can I make a text box attribute on the booking page that has auto complete for address similar to searching locations like in SS below:

On the /make-booking/details page I have an address field attribute that I want to auto-complete addresses on as you type:

Thanks,
Tom

Please try this PHP snippet but please note that it can require further customization. Also please change your_attribute_field_name in the code snippet on your booking attribute field name

add_filter(
	'hivepress/v1/models/booking/attributes',
	function($attributes){
		if(isset($attributes['your_attribute_field_name'])){
			$attributes['your_attribute_field_name']['edit_field']['type'] = 'location';
		}
		return $attributes;
	},
	1000
);

Brilliant! You guys rock this worked perfectly!

Thanks once again,
Tom

1 Like