Skip Navigation

[Resolved] Filter contro distance obbligatory

This support ticket is created 6 years, 7 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 6 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#906187

Good morning, I wanted to ask if there is a way to make the filter wpv-control-distance not obbligatory.

#906625

Hello,

Yes, it is possible, you can consider the custom address field as a simple text field, and setup the filter in the view, for example, custom address field "test addr":
in section "Query Filter", setup filter as:
Select items with field:
test addr is a string like URL_PARAM(wpv-wpcf-test-addr)

display a input box in the custom search form:
[wpv-control-postmeta field="wpcf-test-addr" type="textfield" url_param="wpv-wpcf-test-addr"]

More help:
https://toolset.com/documentation/user-guides/front-page-filters/#custom-search-form