Integration with Gravity Forms?

Home Forums Calendar Products Events Calendar PRO Integration with Gravity Forms?

Viewing 15 posts - 1 through 15 (of 65 total)
  • Author
    Posts
  • #9646
    Christina
    Participant

    I know you are working furiously on the new community events option, but since I can’t wait, I’d like to use Gravity forms to allow for event submission. Tom Bowen’s excellent tutorial no longer seems to work because it appears that the way he referenced date and time have changed. Any hints or clues on how to patch it back together?

    #9647

    Hey Christina,

    I’ll ask Tim or John to update it.

    #9684
    Andrew
    Participant

    +1 for this please 🙂

    #9728
    John
    Member

    The date and time stuff should still work, but the post type has changed between ECP 1.3 and ECP 2.0, so you may need to rebuild the form using the new custom post type. If that doesn’t work, then let me know.

    #9789
    Christina
    Participant

    Shouldn’t the custom post type still be “Events”, or is it something else?

    #9829
    John
    Member

    Yes, it is, but internally the post type name has changed which is why I think that redoing the form should hopefully fix it.

    #9837
    Christina
    Participant

    I rebuilt from scratch and it isn’t working for me. I’m getting the title and description correctly. When I test the form it is being correctly added as a draft in the “Events” category. But none of the other data (date, time, venue…) is persisting.

    I’ll be the first to admit I’m no programming genius, so if anyone on the support forum gets this working, I’d love to know about it. I need this functionality to work for a site that is going live in the next two weeks.

    Or maybe, just maybe, I’ll get super lucky and the Community Events Plugin will be ready within two weeks 🙂

    #9839
    Rob
    Member

    Thanks for confirming, Christina. John is going to take another look at this and should be in touch here shortly.

    #10189

    Hey Christina,

    John poked at it today and noticed that the issue had to do with some new security measures we put in based upon the recommendations of the core team. John said he could update the tutorial to provide a new approach and is working on it. We’ll let you know as soon as he has a working solution.

    #10194
    Rob
    Member

    Hi folks. It looks I spoke with John about this today and it looks like you can get Tim’s original tutorial working by adding this code to the functions.php file:

    add_action(‘save_post’, ‘save_tec_event_meta_from_gravity’, 11, 2);
    function save_tec_event_meta_from_gravity($postId, $post) {
    if( class_exists(‘TribeEvents’) ) {
    // only continue if it’s an event post
    if ( $post->post_type != TribeEvents::POSTTYPE || defined(‘DOING_AJAX’) ) {
    return;
    }
    // don’t do anything on autosave or auto-draft either or massupdates
    if ( wp_is_post_autosave( $postId ) || $post->post_status ‘auto-draft’ || isset($_GET[‘bulk_edit’]) || $_REQUEST[‘action’] ‘inline-save’ ) {
    return;
    }
    if( class_exists(‘TribeEventsAPI’) ) {
    TribeEventsAPI::saveEventMeta($postId, $_POST, $post);
    }
    }
    }

    If anyone has any problems with this or find it non-functional (we tested today and it worked without issue), please let me know.

    #10222
    Rob
    Member

    Or, for those interested in seeing it in a more structured format: https://theeventscalendar.com/event-submissions-using-gravity-forms-in-2-0/.

    #10225
    Brian
    Participant

    Awesome, thanks for this Rob. Attempting to do this integration with GFORMS right now

    #10226
    Brian
    Participant

    Got an error,

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in functions.php on line 149

    There’s a problem somewhere in this line:

    if ( wp_is_post_autosave( $postId ) || $post->post_status ‘auto-draft’ || isset($_GET[‘bulk_edit’])

    Any idea? Is there a typo in there somewhere

    #10231
    Brian
    Participant

    Here is the correct code (did you really try test this?! haha – two equals signs were missing, could not have worked, crashes site)

    add_action(‘save_post’, ‘save_tec_event_meta_from_gravity’, 11, 2);
    function save_tec_event_meta_from_gravity($postId, $post) {
    if( class_exists(‘TribeEvents’) ) {
    // only continue if it’s an event post
    if ( $post->post_type != TribeEvents::POSTTYPE || defined(‘DOING_AJAX’) ) {
    return;
    }
    // don’t do anything on autosave or auto-draft either or massupdates
    if ( wp_is_post_autosave( $postId ) || $post->post_status == ‘auto-draft’ || isset($_GET[‘bulk_edit’]) || $_REQUEST[‘action’] == ‘inline-save’ ) {
    return;
    }
    if( class_exists(‘TribeEventsAPI’) ) {
    TribeEventsAPI::saveEventMeta($postId, $_POST, $post);
    }
    }
    }

    #10232
    Brian
    Participant

    Form is working, event post is created when I submit the form….and title, body, start time and end time are being saved…..but Venue details are not. I have fields like “Venue Name”, “Venue Address”, “Venue City”, and “Venue Zip Code”.

    Using _EventVenue as the custom field name , _EventCity and so on…isn’t working , and the data isn’t being saved along with the other event data. It is submitting to the form though in Gforms.

    Any ideas?

    I’m using the code from this tut http://creativeslice.com/tutorials/gravity-forms-events-calendar-submissions/ along with the code I pasted above in my functions.php file.

Viewing 15 posts - 1 through 15 (of 65 total)
  • The topic ‘Integration with Gravity Forms?’ is closed to new replies.