Custom Fields
Re-Envisioned
Support MB Frontend Submission Prevent FES from creating post WITHOUT returning an error

  • Creator
    Topic
  • #11431
    Resolved elindydotcom
    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.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #11436
    Anh 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 1 replies (of 1 total)
  • You must be logged in to reply to this topic.