Is it possible to make it an option for the location chosen by the seller to be the place of choosing of the client/buyer. For example so the location is Custom/Your choice
Hi @Kuba,
In this case, is recommend indicating to use the Location field as ‘service area’ and the Vendor could add a town, or region here.
I hope this helps!
Cheers,
Chris
Hello,
What if some vendors have a specific location but others have a service area
Hi @Kuba,
You can use the field as a two in one solution. It supports both full addresses and regions, etc. - Just add a description to the field that makes it easier for end users to understand.
You can use the following snippet to add a description:
// Apply custom description to 'location' field on both submit and edit listing forms
add_filter(
'hivepress/v1/forms/listing_submit',
function( $form ) {
if ( isset( $form['fields']['location'] ) ) {
$form['fields']['location']['description'] = 'custom text here';
}
return $form;
},
1000
);
add_filter(
'hivepress/v1/forms/listing_update',
function( $form ) {
if ( isset( $form['fields']['location'] ) ) {
$form['fields']['location']['description'] = 'custom text here';
}
return $form;
},
1000
);
Cheers,
Chris
Thanks, this should work. Where would the description be displayed?
Hi @Kuba,
The snippet I provided above will add a description on the form, just below the Location field title.
The end result should look something like this:
Cheers,
Chris
Ok, thanks
Hi @Kuba,
No problem! I’m happy to have helped you find a solution.
I’ve just updated the code I provided above as there’s actually two forms you’ll most likely want to display the description. (Add Listing and Edit Listing are similar looking, but different forms)
You can also go ahead and mark this topic as solved by hiring the icon on a post to mark it as the solution.
Cheers,
Chris
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.