Hi,
How would I direct a user to the log-in / register form if they're not logged in after they have pressed the submit button? And then hold their submission as a draft until they've verified the account?
You can use the hook rwmb_frontend_after_process to check the user if not logged in then update the post status to draft and redirect to the login page.
Here is the sample code
add_action( 'rwmb_frontend_after_process', function( $config, $post_id ) {
if( ! is_user_logged_in() ) {
// Update post
$my_post = array(
'ID' => $post_id,
'post_status' => 'draft',
);
// Update the post into the database
wp_update_post( $my_post );
// Redirect to the page
wp_redirect( home_url() );
die();
}
}, 99, 2 );