Skip Navigation

[Resolved] Address Filter Not A Required Field.

This support ticket is created 6 years, 3 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 2 replies, has 3 voices.

Last updated by brianD-10 6 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1130096

I have a page that is used to filter events based on location. You can also choose to filter by school or event type.

What I would like to accomplish is to be able to choose event type, or school and submit without having to filter by distance. Right now when I try that it tells me that the "Enter a Location" filed needs to be filled in.

I have tried the AJAX method of updating if anything is selected but it still makes me enter a location and hit Submit.

Also, Is it possible to have something show up regardless of where the location is?

For example. I would like webinars to show up no matter what location is picked since they are not location based.

hidden link

Thanks, in advance, for your time.

#1130509

Hello,

There is a HTML attribute "required" in the location field of search form, you can use custom JS codes to remove it, for example, edit your view, and try these:
1) Disable AJAX method you mentioned above
2) in "Search and Pagination", click "JS Editor", add below JS codes:

jQuery(document).ready(function($) {
  $('input.js-toolset-maps-distance-center').removeAttr('required');
})

More help:
hidden link

#1173607

@luo's answer worked for me, thanks!

I think this is a related question: https://toolset.com/forums/topic/how-to-make-distance-view-not-always-required/