We want to establish a list of artist residencies, which means that artists get accommodation and/or studio for a given time at a given place. Some residencies are offered by the institutions at the residency location (XY Residency Foundation), others are offered by foundations with a national or regional scope.
Therefore, to make the list work for searching and filtering, we need to add geographical codes to the entries, on two sides:
a) place of residency ("I am looking for a residency in country X"), and
b) place of the applicant ("I live in the state of Y, for which residencies can I apply?")
This leads me to two questions on Toolset:
a) with regard to exact locations, which can be located on a map with Google or Bing, is there a way to search/filter the results e.g. by country, or state, if there is only the geolocation/maps field filled in? (or are additional fields for country/state necessary?)
b) Is there a "template" for a geographical repository, where the user can select/deselect countries and also states therein?
I am thankful for any hint!
Hi, I'll be glad to give you some additional information.
a) with regard to exact locations, which can be located on a map with Google or Bing, is there a way to search/filter the results e.g. by country, or state, if there is only the geolocation/maps field filled in? (or are additional fields for country/state necessary?)
There is no way to filter by country or state if a single Types Address field is used to store the location. It would require additional fields for country / state / region and so on. Types address fields do not automatically separate this information for you, but another ticket in the forum shows an example of how you can use custom code to split individual pieces into separate fields: https://toolset.com/forums/topic/separating-content-from-the-address-field/
b) Is there a "template" for a geographical repository, where the user can select/deselect countries and also states therein?
There's nothing built-in to Toolset, but other Users have created custom modules for this purpose. You can use Toolset Module Manager to import their work as a starting point. Check the link here for more information: https://toolset.com/forums/topic/how-to-import-states-and-countries-into-selects-for-fields/
Thank you – I obviously searched for the wrong search terms, so thank you for guiding me to the relevant forum entries!
It seems that we cannot make it work – is the description at https://toolset.com/forums/topic/separating-content-from-the-address-field/ still valid, or has there been some changes in the meantime?
Thank you!
Yes, it is still the case that you must use custom JavaScript to parse the geocoded results from the Maps API, then use custom code to separate those elements into your desired custom fields. It's an advanced technique that requires knowledge of JavaScript and PHP.