Prevent FES from creating post WITHOUT returning an error

Support MB Frontend Submission Prevent FES from creating post WITHOUT returning an errorResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11431
    maybeadevmaybeadev
    Participant

    Hi:

    Is there a way to prevent FES from creating the post without returning an error to the front-end? The reason is we want to capture the post data and handle the wp_insert_post function ourselves (various api calls etc).

    Thanks.

    #11436
    Anh TranAnh Tran
    Keymaster

    Hi,

    The error is created during the internal saving process. If you want to handle the saving posts yourself, then you need to break the plugin's saving process.

    I think that can be done with the hook rwmb_frontend_before_process, like this:

    add_action( 'rwmb_frontend_before_process', function() {
       // Save your data
       // Redirect users to your confirmation page
    } );
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.