You are right $form_data is an associative array of data about current form (like id, post_type and form_type). You may need to query the saved data based on the $post_id, for example:
get_post($post_id);
Dump of $_POST may also be helpful to find what's available at hand.
print_r($_POST)
Following sample code may also help you understand:
add_filter('cred_success_redirect_131', 'custom_redirect_for_form_with_id_131',10,3);
function custom_redirect_for_form_with_id_131($url, $post_id, $form_data) {
// See what we've at hand
/*print_r($form_data);
print_r($_POST);
die();*/
if ($form_data['id']==131) {
// Fetch what was saved
$saved_data = get_post($post_id);
// Process $saved_data
// i.e. prepare an email, create another post or update existing post
$blogpost = array(
'post_title' => wp_strip_all_tags("New book is now available: {$saved_data->post_title}"),
'post_content' => "A new book has been added, <a href=\"".get_permalink($post_id)."\">{$saved_data->post_title}</a>.",
'post_status' => 'publish',
'post_author' => 1,
'post_category' => array(1)
);
wp_insert_post( $blogpost );
// Or redirect to any desired location
return '<em><u>hidden link</u></em>';
}
return $url;
}
Please let me know if you are satisfied with my answer and if I can help you with any other related question.