Call Input from Community Event Edit Page

Home Forums Calendar Products Community Events Call Input from Community Event Edit Page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #173963
    rmcneil98
    Participant

    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

    #180845
    Barry
    Member

    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 🙂

    #506005
    Barry
    Member

    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!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Call Input from Community Event Edit Page’ is closed to new replies.