Help Desk

Call Input from Community Event Edit Page

  • Topics: 1
    | Permalink

    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.

    Any suggestions?

    Thanks!

    Ryan

    Posts: 18146 Topics: 17 Answers: 973
    | Permalink

    Hi Ryan!

    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 🙂

    Posts: 18146 Topics: 17 Answers: 973
    | Permalink

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

The topic ‘Call Input from Community Event Edit Page’ is closed to new replies.