Home › Forums › Calendar Products › Community Events › Removing/Creating State and Province Fields
- This topic has 4 replies, 2 voices, and was last updated 10 years, 10 months ago by
Barry.
-
AuthorPosts
-
June 10, 2015 at 7:54 am #968453
David
ParticipantI am creating a community calendar for an area in Mexico. Since the States field defaults to US states, we do not need either the States or Province fields, so I’d like to delete them.
Instead, I’d like to add town names… and have it mandatory to select one for every event.
Is this possible?
And is it possible to search by them on the front end?
My site is not live yet, so unfortunately you won’t be able to access it.
Thanks!
June 10, 2015 at 1:32 pm #968606Barry
MemberHi Allyson,
Community Events is extremely customizable and the best starting point if you’re new to making changes like this is our Themer’s Guide, which explains how to safely override and customize our templates.
In this case, specifically, you could remove the state and province fields by overriding the community/modules/venue.php template. Within that you could remove the country and state/province fields by eliminating this section of code:
https://gist.github.com/anonymous/22932ffd5a0571f5eb9c
Instead, I’d like to add town names… and have it mandatory to select one for every event.
Definitely possible. Look just above the section of code I copied above and you will see the existing city field, which you might change to a pre-determined dropdown.
To learn about enforcing this as a required field, please review the following knowledgebase post:
theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form
I hope that helps 🙂
June 19, 2015 at 8:28 am #971316David
ParticipantBarry, thanks. One more question… would it be easier to replace the Venue field with a Town field so people can filter by town? (if I buy the filter plugin?)
June 19, 2015 at 10:07 am #971393Barry
MemberThe existing city field seems like a natural fit to me (and if you customize it further by making it a dropdown of pre-chosen options that might fit your needs even better).
Adding Filter Bar could definitely open up some options, but I’d emphasize before you make that purchase that filtering by venue address fields (such as the city) is not something it supports “out of the box”.
Events Calendar PRO, on the other hand, does add geolocation facilities. So, if the venue is a valid address that Google can parse into a set of coordinates, location based searches do then become a possibility.
July 6, 2015 at 5:59 am #976043Barry
MemberHi!
It’s been a while so I’m going to go ahead and close this topic.
- Need help with anything else? Go right ahead and post a new topic, one of the team will be only too happy to help
- Still need help with this issue and need to re-open it? Again, please simply create a new topic and link to this one to provide the team with some context
Thanks!
-
AuthorPosts
- The topic ‘Removing/Creating State and Province Fields’ is closed to new replies.
