Custom Fields
Re-Envisioned
Support MB Frontend Submission Any ideas of how to add a Save as Draft option?

  • Creator
    Topic
  • #29189
    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #29191
    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.
    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 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://metabox.io/support/topic/selecting-post-formats/

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