outlook calendar event from form post

After someone fills out a form on my site (using gravity forms) is there any known integration/widget that would allow me to have an “Add this event to my Outlook Calendar” link in the submission email/text?

Thanks

Related posts

Leave a Reply

1 comment

  1. I am not aware of any special plugin to do that , there are many that have this functionality , but only when using as a whole event system (and not specific to gravity forms as far as i know).
    But – fortunately , it is fairly easy to make with PHP :
    you just have to construct a simple string.

    header("Content-Type: text/Calendar");
    header("Content-Disposition: inline; filename=event.ics");
    $ics_string = 'BEGIN:VCALENDARn';
    $ics_string .= 'VERSION:2.0n';
    $ics_string .= 'PRODID:-//whatever//NONSGML //ENn';
    $ics_string .= 'METHOD:REQUESTn'; // requied only 4  Outlook
    $ics_string .= 'BEGIN:VEVENTn';
    $ics_string .= 'UID:'.date('Ymd').'T'.date('His').'-'.md5(uniqid(mt_rand(), true)).'-mystrinng'; // requied only 4  Outlook - you can use only simple rand(0,999999)
    $ics_string .= 'DTSTAMP:".date('Ymd').'T'.date('His')."n'; //requied only 4  Outlook
    $ics_string .= 'DTSTART:20120416T000000n'; // april 16 2012, T = HHMMSS
    $ics_string .= 'SUMMARY:your summeryn';
    $ics_string .= 'DESCRIPTION: your descriptionn';
    $ics_string .= 'END:VEVENTn';
    $ics_string .= 'END:VCALENDARn';
    echo $ics_string;
    

    of course , you will populate the fields with whatever you want , for example :

    $summery = get_the_title();
    $desc = get_the_excerpt();
    

    and in the string :

     $ics_string .= 'SUMMARY:' . $summery . 'n';
    

    or

     $ics_string .= 'DESCRIPTION:' . $desc . 'n';
    

    you can even use GET or POST

    echo 'DTSTART:$_GET[date]n';
    echo 'SUMMARY:Go to a movie with ' . $_GET[girlfriend] . 'n';
    echo 'DESCRIPTION: be careful not to be caught by ' . $_GET[other_girlfriend] . ' or ' .$_GET[wife] .'n';
    

    see specs for format here : http://www.kanzaki.com/docs/ical/

    here http://www.ietf.org/rfc/rfc2445.txt

    or here http://en.wikipedia.org/wiki/ICalendar