Removing/Creating State and Province Fields

Home Forums Calendar Products Community Events Removing/Creating State and Province Fields

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #968453
    David
    Participant

    I 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!

    #968606
    Barry
    Member

    Hi 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 🙂

    #971316
    David
    Participant

    Barry, 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?)

    #971393
    Barry
    Member

    The 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.

    #976043
    Barry
    Member

    Hi!

    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!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Removing/Creating State and Province Fields’ is closed to new replies.