Skip Navigation

[Gelöst] Customising Search Form Using Maps Distance Filter (Q1)

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:
How to hide the map distance filter unit dropdown that displays km and mi and also how to change the option text

Solution:
To hide that select box, please try to add following line of CSS code to your view's "Search and Pagination" section's CSS box and try to resolve your issue.:

#toolset-maps-distance { display: none !important; }

Currently there is no native feature available to change the mi option value but as a workaround you can use the following javascript code and add it to JS box and try to resolve your issue.

jQuery(document).ready(function($){
  $('#toolset-maps-distance option[value=mi]').text('Miles')
 });

Relevant Documentation:

This support ticket is created vor 5 Jahre, 8 Monate. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 Antworten, has 2 Stimmen.

Last updated by julieP vor 5 Jahre, 8 Monate.

Assisted by: Minesh.

Author
Artikel
#957102

How do I change the option value text mi to miles?

OR

How do I not display the distance value select field? I've tried using CSS:

select#toolset-maps-distance-value {display:none !important;}

but it's not working.

Thanks

#957185

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - as I understand you want to hide the dropdown select that displays the distance unit mi or km.

To hide that select box, please try to add following line of CSS code to your view's "Search and Pagination" section's CSS box and try to resolve your issue.:

#toolset-maps-distance { display: none !important; }
#957188

Ah thank you I can see I was targeting the wrong class!

and the other option (of changing mi to miles) ??

#957199

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - currently there is no native feature available to change the mi option value but as a workaround you can use the following javascript code and add it to JS box and try to resolve your issue.

jQuery(document).ready(function($){
  $('#toolset-maps-distance option[value=mi]').text('Miles')
 });

I'm also taking this issue as new feature request that will allow users to modify the unit option values.

#957200

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Please feel free to close this ticket 🙂

#957203

That's great Minesh - thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.