Skip Navigation

[Resuelto] Customising Search Form Using Maps Distance Filter (Q1)

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 6 años, 4 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 5 respuestas, tiene 2 mensajes.

Última actualización por julieP hace 6 años, 4 meses.

Asistido por: Minesh.

Autor
Mensajes
#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

Idiomas: Inglés (English )

Zona horaria: 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

Idiomas: Inglés (English )

Zona horaria: 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

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Please feel free to close this ticket 🙂

#957203

That's great Minesh - thank you!