Skip Navigation

[Resolved] Styling the search form (hiding distance and measurement fields etc)

This support ticket is created 5 years, 10 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.

This topic contains 2 replies, has 2 voices.

Last updated by Beda 5 years, 10 months ago.

Author
Posts
#1186756

Tell us what you are trying to do?

I want to hide the 'show search results within' and the 'distance field' and the 'measurements drop down' and the word 'of' and just show the 'enter a location' button and the 'submit' button (renaming submit to search) and hiding the 'use my location' button also.

I have attached a screenshot which shows the current 'before' and how I'd like it to look in the 'after'

Is there any documentation that you are following?

I don't see any great documentation available for what I'm trying to achieve.

Is there a similar example that we can see?

I have attached a screenshot of what I'd like yes

What is the link to your site?

hidden link

The search is currently on the home page

#1186772
solar-search-design.png

Sorry I forgot the screenshot of what I'm looking to achieve

#1187278
Bildschirmfoto 2019-01-17 um 09.36.47.png

I see you created this search with Views. It's the View with ID 572. When you edit that View, you will find a section called "Search and Pagination".
In there you see a lot of ShortCodes and HTML, this is what creates the search you refer to.
You can rename the Submit Button in there, for example.
For this, simply remove the submit shortcode "[wpv-filter-submit output="bootstrap"][/wpv-filter-controls]" you have now, and insert it again with a custom label.
Then you can also change the label.

Then you can also remove all other Filters you inserted with ShortCodes in that section, and insert only an address search.
This then will allow you to search by an address.
However, mind that it won't return results unless the users insert the exact address as it is stored in the database unless you provide them with a Select Dropdown instead of a text input.

Hence, your current solution is much better, because it allows finding results within a distance from an automatically populated address (where the user only types the first letters and is then offered several addresses to use (from google))

There is also the option to use a Query filter that only shows results within a certain distance, given the current user location - this can be inserted as a query filter, so the user would not even have to insert an address but only share his/her location.

All these filter methods are described in their possibility here:
https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/#filtering-and-ordering-map-markers-by-distance
https://toolset.com/documentation/user-guides/display-on-google-maps/filtering-and-ordering-map-markers-by-distance/

To further enhance and control single items of the Distance Filter as you have inserted it (front end) it would need new features. The Feature Request would be to allow hiding (preset) filter parts and altering strings of the filter. This is currently not possible as you describe it - if inserted like that, the distance filter will always output that same "structure".
New features can be requested here:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/