Call Input from Community Event Edit Page
I am working on integrating my preexisting categories into the Events Calendar and have already created a new module listing those categories as checkboxes to select when creating/editing a new event on the front end. The problem is figuring out how to save the info. I just need to know at what point the $_POST info is called from the edit page and how it is passed into the save function. I figure if I can understand how CE saves info from the edit page, I can add my info as well.
The magic starts within TribeCommunityEvents::doEventForm() and if you follow the train of logic you will see that the submitted post data is scrubbed clean as a security measure:
$scrubber = new TribeCommunityEvents_SubmissionScrubber($submission); $_POST = $scrubber->scrub();
To avoid fields from your own module being scrubbed out you may then wish to work with the tribe_events_community_allowed_event_fields filter.
The usual actions such as save_post will ultimately also fire when the event is created and you could effectively piggy back on this process. The rest is up to you – good luck 🙂
The topic ‘Call Input from Community Event Edit Page’ is closed to new replies.