Hi!
I have been looking for a free plugin to do this, and found WordPress Form Manager. This solution is not ideal, as the event would afterward have to be manually set up with dates and more, but it’s a little way there.
However, the plugin only posts to the standard post type.
I have identified what I believe is responsible for doing the actual posting (below), and was wondering if someone could tell me what to substitute for what if indeed this is the only thing I need to alter.
If I get it to work, I promise a full step-by-step!
function fm_helper_publishPost($formInfo, &$postData){
global $fm_display;
global $fmdb;
//use the same shortcodes as the e-mails
$advEmail = new fm_advanced_email_class($formInfo, $postData);
$parser = new fm_custom_shortcode_parser($advEmail->shortcodeList, array($advEmail, 'emailShortcodeCallback'));
$postTitle = $parser->parse($formInfo['publish_post_title']);
$newPost = array(
'post_title' => sprintf($postTitle, $formInfo['title']),
'post_content' => $fm_display->displayDataSummary('summary', $formInfo, $postData),
'post_status' => (trim($formInfo['publish_post_status']) == "" ? 'publish' : $formInfo['publish_post_status']),
'post_author' => 1,
'post_category' => array($formInfo['publish_post_category'])
);
// Insert the post into the database
$postID = wp_insert_post($newPost, false);
if($postID != 0){
$fmdb->updateDataSubmissionRow($formInfo['ID'], $postData['timestamp'], $postData['user'], $postData['user_ip'], array('post_id' => $postID));
}
$postData['post_id'] = $postID;
}