I think you use the function wp_insert_post()
from the form to create the post; the function return the ID and you can use it.
if ( defined( 'WP_DEBUG' ) && WP_DEBUG )
$wp_error = TRUE;
// insert post
$post_id = wp_insert_post( $new_postarr, $wp_error );