Skip Navigation

[Resolved] Distance Shortcode (Change placeholder text and set default distance)

This thread is resolved. Here is a description of the problem and solution.

Problem:
Distance Shortcode (Change placeholder text and set default distance)

Solution:
To change the distance filter textbox placeholder text - you should try to add following code to your view's filter editor's JS box:

jQuery(document).ready(function(){
  $('#toolset-maps-distance-center').attr('placeholder','ENTER CITY OR ZIPCODE');
});

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/distance-shortcode-change-placeholder-text-and-set-default-distance/#post-913836

Relevant Documentation:

This support ticket is created 6 years, 6 months ago. 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.

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)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 6 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#913139

Hi.

I'm trying to change the distance shortcode to automatically display everything within a default distance and to just have ONE fields for Location and change the placeholder to (Enter City or Zipcode).

Are you able to help me with this?

#913361

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - could you please explain me in brief what should be your expected results while using distance shortcode? Few images would be helpful to understand your issue.

#913459

Hey! Ok. We sorted out a lot of this.
But go here: hidden link
Notice the location input field. I just want the label for 'Enter City of Zipcode' to be INSIDE of the field instead of the words location.

#913836

Minesh
Supporter

Languages: English (English )

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

Well - to change the distance filter textbox placeholder text - you should try to add following code to your view's filter editor's JS box:

jQuery(document).ready(function(){
  $('#toolset-maps-distance-center').attr('placeholder','ENTER CITY OR ZIPCODE');
});

And add following attribute to your distance filter shortcode:

inputs_placeholder="%%CENTER%%"

For example:

 [wpv-control-distance inputs_placeholder="%%CENTER%%" compare_field="property-location" distance_center_url_param="toolset_maps_distance_center" distance_radius_url_param="toolset_maps_distance_radius" distance_unit_url_param="toolset_maps_distance_unit"]