tomp
September 19, 2022, 11:26am
1
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
yevhen
September 20, 2022, 11:42am
4
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
);
tomp
September 20, 2022, 11:56am
5
Brilliant! You guys rock this worked perfectly!
Thanks once again,
Tom
1 Like
system
Closed
October 20, 2022, 11:56am
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.