• davidpike7

    (@davidpike7)


    Hello

    This has been touched on previous posts, but I seem to be going wrong somewhere so was wondering if anyone had any suggestions.

    I’ve added the input to event-editor.php in my theme folder (which is showing up)

    I’ve then added the other chunk of code to my functions.php

    The function seems to work fine if I manually put in the email. I can’t find a way to test whether I’m getting anything from $_POST.

    Also how do I get the event ID to set it as the post id to run update_post_meta?

    I’m using ACF for the backend so this is just for the frontend submission.

    http://hastebin.com/hafewelipa.xml

    Many thanks

    http://wordpress.org/extend/plugins/events-manager/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    if you add event attributes (see our docs), they are actually custom fields as well, but they’ll also show up in the front-end

    Thread Starter davidpike7

    (@davidpike7)

    Thanks Marcus, but I previously tried to use attributes and it conflicted with ACF and some of the of the custom fields are fairly complex, post relationships/image uploads etc, so I’d prefer to do it this way.

    Should I not be able access the contents of $_POST using this?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    yes, this should be possible. from the looks of it, you should change the number 670 with EM_Event->event_id

    Thread Starter davidpike7

    (@davidpike7)

    Cheers Marcus. So I’ve managed to get the event id. I ended up using EM_Event->post_id as ACF is using the custom field from the event post type and this worked perfectly.

    However the contents of $_POST seems empty? Stupid question but is there a way I can print out the contents of post whilst running the filter I tried print_r($_POST) but it didn’t seem to do anything.

    thanks

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    should be available… what about $_REQUEST?

    Thread Starter davidpike7

    (@davidpike7)

    I was able to echo out the contents of the request/post when I removed ‘return $result;’ but obviously this breaks the event manager functionality.

    If I add the ‘return’ the contents of the $_REQUEST/$_POST don’t seem to enter the custom field.

    Any idea what could be causing this? Is there a way I can print out the contents of $_POST (just to test it out) without removing the ‘return’?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Events Manager] Saving Custom Fields from front end submission’ is closed to new replies.