Any ideas of how to add a Save as Draft option?

Support MB Frontend Submission Any ideas of how to add a Save as Draft option?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #29189
    Stephen C.Stephen C.
    Participant

    I need to be able to give the user the option of saving their submission as a draft if they aren't ready to submit for approval. I know Meta Box doesn't have a way to do this natively, so I need a workaround. Any thoughts on how to accomplish this? A button next to the submit button that says "Save as Draft", but as far as I can tell, there's no way to do that.

    Right now, I'm thinking of adding a switch field that says "Save as Draft" and then if selected, use the rwmb_after_save_post action to change the status to draft if the submission hasn't already been published.

    Any other ideas that might work or look better?

    Thanks

    #29191
    Stephen C.Stephen C.
    Participant

    Also, is there a way to only show a Meta Box if it's a new post or the post_status is "draft"?

    #29193
    Stephen C.Stephen C.
    Participant

    Okay, I was able to use Include/Exclude to include the Meta Box only when it's a new post or the post_status is "draft".

    #29199
    Long NguyenLong Nguyen
    Moderator

    Hi,

    It is possible. You can use the function wp_update_post() to update the post status after submitting a post on the frontend.

    Refer to this topic https://support.metabox.io/topic/selecting-post-formats/

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.