Support » Plugin: Events Manager » Backend: Add New Event: Where: Make fields optional, not required

  • Resolved anbumz

    (@anbumz)


    Hi there,

    the form in the backend to add new events includes a “Where” section with several required fields: Location name; Address; City/Town; and Country.

    We would like to add events that do have a location but for which we do not necessarily wish to complete all required fields. For instance, there are events where the exact location will be determined later, but still they should be in the calendar. In this case, we would provide City/Town and Country but not location name or address. There are other variations.

    Any hint how we can remove the required status of those fields is much appreciated. Happy to edit PHP files if necessary.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Not a good idea…

    When there is no Location Name, the Ajax Search cannot be performed. So, a new entry will be created in your database upon every new event. Since you are only using the city to describe them initially, you will end up with a lot of the same entries. How would you keep them apart and know which one to edit for that specific event?

    You cannot edit a location from the Edit Event Page, so you would have to look it up in the Edit Locations section… Try finding the right “New York” if you have 20 😉

    You could better set “Location required” to “No” (perhaps even hide the Where meta box from the front-end submission view) and then use a custom event attribute field for the user to fill out the city.

    Since in both cases you would have to edit the location manually, you can then either select an existing one or create a new location, but only if needed.

    That will keep your database and interface much cleaner.

    Thread Starter anbumz

    (@anbumz)

    Thanks, this was helpful. We will use a custom event attribute field to work around this issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Backend: Add New Event: Where: Make fields optional, not required’ is closed to new replies.