PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Events Calendar Pro

  1. Extrememuz
    Member

    There's a great little tutorial on how to intergrate Events Calendar Pro & Gravity Forms here.

    http://events.creativeoven.com/2010/08/tutorial/

    I'm stuck on the third step on how to Create new form with these fields…

    _isEvent (make this “1″) do we need this field?

    _EventStartDate (2010-05-20 09:00:00)
    _EventEndDate (2010-05-20 17:00:00)

    _EventPhone
    _EventVenue
    _EventCost

    _EventAddress
    _EventCity
    _EventZip
    _EventState (AZ)
    _EventCountry (United States)
    _EventProvince do we need this field?
    _EventShowMapLink (true or false)

    _EventAllDay (make this “yes” if it’s a full day event)

    Any help to start me off would be appreciated.

    Posted 13 years ago on Thursday September 30, 2010 | Permalink
  2. Those fields would all be custom fields so you would use the "Custom Field" field type under the "Post Fields" section. You would create a field for each of these and for the custom field name you would use the key (ex. _EventZip). It would then create a post with a custom field using that key.

    I don't know what fields are or aren't required as the Events Calendar Pro plugin isn't one of ours and i've never used it.

    Posted 13 years ago on Thursday September 30, 2010 | Permalink
  3. mcdarwin
    Member

    I followed the instructions you posted a link to: http://events.creativeoven.com/2010/08/tutorial/ - and I think it works.

    First I created a form with all the custom fields. Some of them I gave a default value and checked the advanced option: "Visibility - Admin only".

    I also created a "Post title" and a "Post body field". Then I took the code from the link you
    posted and put in the gravityforms.php file at the end.

    There is a couple of places in the code you will have to insert/replace the form ID with the actual ID of your form. Also you will have to insert the date field IDs. My form ID is 5 and the format for my date field has to look like this: "input_5_2" (form 5, field 2) and not like this "input_2" as in his example. At least that is what I did - you can see the field ID's in your form-page sourcecode.

    After sending the form I go to the event plugin in wp-admin and I see an unpublished event. I changed it to published and I got the data submitted to show up in my event calendar, pretty cool actually.

    Hope that helps you...

    Posted 13 years ago on Monday October 25, 2010 | Permalink
  4. This method no longer appears to be working with the Gravity Forms 1.5. I've got it narrowed down to the problem being in this function code. Can somebody help point me in the right direction to fix it?

    add_action("gform_pre_submission", "format_event_date");
    function format_event_date($form){
    
        //replace 1 with your actual form id
        if($form["id"] != 1)
            return;
    
        //replace 4 with your actual date field ID
        $date = $_POST["input_1_13"];
    
        //replace 5 with your actual time field ID
        $time = $_POST["input_1_14"];
        $timeend = $_POST["input_1_15"];
    
        $hour = str_pad($time[0], 2, "0", STR_PAD_LEFT); //making sure hour has 2 digits
        $minute = str_pad($time[1], 2, "0", STR_PAD_LEFT); //making sure minutes has 2 digits
    
        $hourend = str_pad($timeend[0], 2, "0", STR_PAD_LEFT); //making sure hour has 2 digits
        $minuteend = str_pad($timeend[1], 2, "0", STR_PAD_LEFT); //making sure minutes has 2 digits
    
        //formatting date
        $raw_date = "{$date} {$hour}:{$minute}{$time[2]}";
        $formatted_date = gmdate("Y-m-d H:i:s", strtotime($raw_date));
    
        $raw_dateend = "{$date} {$hourend}:{$minuteend}{$timeend[2]}";
        $formatted_dateend = gmdate("Y-m-d H:i:s", strtotime($raw_dateend));
    
        //replace with the IDs of the hidden fields that will hold the formatted dates
        $_POST["input_1_17"] = $formatted_date;
        $_POST["input_1_18"] = $formatted_dateend;
    
     }
    Posted 13 years ago on Tuesday March 1, 2011 | Permalink
  5. Any update on this? We're having issues where each event is posted 4 times on submission and the dates are not working. Any suggestions?

    Posted 13 years ago on Wednesday March 30, 2011 | Permalink
  6. What part isn't working? This integration was posted by another user so it wasn't something we published as an official support tutorial. I'm not familiar with Events Calendar Pro so if you can provide more details we may be able to assist.

    Posted 13 years ago on Wednesday March 30, 2011 | Permalink
  7. We're having 2 issues right now.

    1) 4 posts are created when a new event is added. This problem is not occurring with other custom post types so we're pretty sure this is an Events Calendar Pro bug but would love to hear any insights you may have as to why this could happen.

    2) We cannot get the date to be passed correctly in Events Calendar Pro. This was working perfectly before the Gravity Forms 1.5 update but we can't figure out what would have changed. Here is the code in the functions file which used to work:

    add_action("gform_pre_submission", "format_event_date");
    function format_event_date($form){
    
        //replace 1 with your actual form id
        if($form["id"] != 1)
            return;
    
        //replace 4 with your actual date field ID
        $date = $_POST["input_6"];
        $dateend = $_POST["input_8"];
    
        //replace with your actual time field ID
        $time = $_POST["input_7"];
        $timeend = $_POST["input_9"];
    
        $hour = str_pad($time[0], 2, "0", STR_PAD_LEFT); //making sure hour has 2 digits
        $minute = str_pad($time[1], 2, "0", STR_PAD_LEFT); //making sure minutes has 2 digits
    
        $hourend = str_pad($timeend[0], 2, "0", STR_PAD_LEFT); //making sure hour has 2 digits
        $minuteend = str_pad($timeend[1], 2, "0", STR_PAD_LEFT); //making sure minutes has 2 digits
    
        //formatting date
        $raw_date = "{$date} {$hour}:{$minute}{$time[2]}";
        $formatted_date = gmdate("Y-m-d H:i:s", strtotime($raw_date));
    
        $raw_dateend = "{$dateend} {$hourend}:{$minuteend}{$timeend[2]}";
        $formatted_dateend = gmdate("Y-m-d H:i:s", strtotime($raw_dateend));
    
        //replace with the IDs of the hidden fields that will hold the formatted dates
        $_POST["input_20"] = $formatted_date;
        $_POST["input_21"] = $formatted_dateend;
    
     }

    Any help or pointing in the right direction would be greatly appreciated,

    Thanks!
    - Tim

    Posted 13 years ago on Wednesday March 30, 2011 | Permalink
  8. I hope someone can figure this out and post an solution for this!

    ~ Luc

    Posted 13 years ago on Saturday April 2, 2011 | Permalink
  9. Edwin
    Member

    Hi, I am struggling with the same problem.
    Really would appreciate a solution.

    Posted 13 years ago on Wednesday April 6, 2011 | Permalink
  10. yes, but as the problem is events calendar pro related maybe we should ask it on their forum?

    Posted 13 years ago on Friday April 8, 2011 | Permalink
  11. Edwin
    Member

    The problem is the diffrence in the dateformat the two plugins use.
    And as the date format in Events Calendar pro is the international date format (ISO) YYYY-MM-DD
    And also the ISO format is requested by more GF users for non Events Calendar pro issues.
    So in my opnion this is the way to go.

    Posted 13 years ago on Friday April 8, 2011 | Permalink
  12. Updated tutorial here: http://creativeslice.com/tutorials/gravity-forms-events-calendar-submissions/

    Posted 13 years ago on Tuesday May 3, 2011 | Permalink