Support

Home Forums Event Espresso Premium EE4: Need a custom field for each "Event Datetimes" item that is setup for Event

EE4: Need a custom field for each "Event Datetimes" item that is setup for Event

Posted: June 27, 2019 at 9:01 pm

Viewing 1 reply thread


mbeede@tracom.com

June 27, 2019 at 9:01 pm

Greetings – When we setup new events in Event Espresso for upcoming training we also setup different dates and times that are available for each training event. We do this using the “Event Datetimes” section. But now I need to add a custom field for each of the “Event Datetimes” items that will hold a meeting ID (from ZOOM).

And I need to be able to pull that custom field data out of the $data object that is in the back-end PHP code like all of the other event data. if it’s just part of the $data object too then that would be perfect.

I don’t see a way to do this – can you help me out?

Thanks in advance – Mark!


Josh

  • Support Staff

June 28, 2019 at 7:42 am

Hi Mark,

This is going to require more than a few dozen lines of code to add.

What you could do is review the WP User Integration add-on’s
insert_ticket_meta_interface,
_get_ticket_capability_required_form,
and update_capability_on_ticket methods. That add-on is basically doing the same thing where it hooks in to the event editor to add a custom field for Event Tickets. So the one difference is instead of adding the custom field to Event Datetimes, it’s added to Event Tickets. Here’s a link to the source file:
https://github.com/eventespresso/eea-wpuser-integration/blob/master/EED_WP_Users_Admin.module.php

The custom field data can be saved to the _esp_extra_meta table, and the EXM_type will be Datetime.

Once you have everything set up to record to _esp_extra_meta, you can retrieve the data either from using the $wpdb class or from using EE’s built in model system.

Viewing 1 reply thread

The support post ‘EE4: Need a custom field for each "Event Datetimes" item that is setup for Event’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso