Skip Navigation

[Resolved] Save post as draft first. then preview it. then publish it

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to set up a workflow where someone can save a post as a draft, then preview the post, make changes as needed, then publish it.

Solution: Use Forms to create content in a pending or draft status, then use an edit post form to modify that post status.

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 3 voices.

Last updated by michaelR-26 5 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#953459

Hello,
I'd like to do the following.

I would like to allow the user to submit a form as a draft so she gets to preview the content and what the result will look like.
Then when everything's fine and looks good to the user there should be a button on the preview/draft page where she can publish the post for review just clicking on the button. The same page should then reload again but this time the post has the post status of pending instead of draft.
If the user is not happy with how things look on the preview page then it should be possible for him to edit the post ( I already know how to do this part)

But I am not sure how I can place a button on the draft page that allows the user to put the post in a "pending" state.

Thanks for your help in advance.
Nick

#953711

Hi, you can do this with an Edit Post Form. Here's how you set it up:
- Create an Edit Post Form that edits the current Post. Set the post status to be "Pending Review".
- Use the auto-generate button to generate the Form code, then remove everything except the credform , form_messages, and form_submit shortcodes. It will look something like this:

[credform class='cred-form cred-keep-original']

	[cred_field field='form_messages' value='' class='alert alert-warning']
	[cred_field field='form_submit' value='Submit for Review' urlparam='' class='btn btn-primary btn-lg' output='bootstrap']

[/credform]

Change the "Submit" text to be something like "Submit for Review". Then insert this Form somewhere in the post Content Template or Template Layout, and use Conditional HTML to show or hide the button depending on the post status. If it's Draft, show the Form.

#1709221

I tried this but am having a tough time.

I already had an edit post form, so I set it Draft after posting and then show the post.

Then I made the new edit form with your instructions, my new form has this code

[credform]
[cred_field field='form_messages' class='alert alert-warning']

[cred_field field='form_submit' output='bootstrap' value='Submit' class='btn btn-primary btn-lg']
[/credform]

I took this form code and inserted into the bottom of my Custom Post Template. I tried to add this conditional around the form block.

Post Source is Current Post
Source is Post Status
Then I set to = static value and entered Draft in the box.

I save the Custom Post tempate and try to Edit the post, which works fine. But the new button to submit for review does not show on the post page where I placed it.

What could I be doing wrong. I really need to be able to preview the post prior to submit.

Thank you in advance.

New threads created by Christian Cox and linked to this one are listed below:

https://toolset.com/forums/topic/split-save-post-as-draft-first-then-preview-it-then-publish-it/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.