Location field for Booking details

Hey @everyone,

I’d like to essentially recreate the Location field that’s added by the Geolocation extension, and have it as a new field on the Add Details page when making a booking. The location that’s entered should then be added to the booking information presented to vendors.

I will tinker away on my own, but if anyone has achieved this themselves, or can provide any guidance on this, I’d be super grateful for your help.

Cheers,
Chris :victory_hand:

Hi,

Thanks for the request. Please clarify why you are not using the standard location field. Also, please describe the use case in more detail regarding the addition of a new field, and we will try to provide a solution or workaround.

Hi @Andrii,

I am using the Geolocation extension to add the standard Location field to listings. I don’t want to remove this. Instead, I want to create a second Location field.

On my site, the standard field is used to enter a region/town in which Vendors offer their services. My use-case involves Vendors visiting Buyers at their home address. Therefore, Buyers need to give Vendors an address that tells them where to visit. What I’d like to do is add a second Location field on the Add Details page when creating a booking, and since the Location field seems like the best option, I’d like to ideally use it - rather than just creating a text area for Buyers to enter their address.

I hope that makes sense!

If there’s some way of turning the Geolocation extension into a selectable Attribute type, that would be ideal.

Cheers,
Chris :victory_hand:

Hi,

Unfortunately there’s no easy way to turn Location into a selectable field type in the UI, but you can try to insert 3 attributes of location, latitude and longitude types via the hivepress/v1/models/booking/attributes hook the same way it’s done for listings in Geolocation (add_attributes function) hivepress-geolocation/includes/components/class-geolocation.php at master · hivepress/hivepress-geolocation · GitHub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.