Skip Navigation

[Resolved] Changing the status of a CPT

This support ticket is created 5 years 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Zayne 5 years ago.

Assisted by: Waqar.

Author
Posts
#1481391

I want to allow the users, using a front-end form, to be able to save a Work CPT as Draft so that it doesn't show for the public. I then want them to be able, when they are ready (i.e. have added all the correct info and linked a Product CPT) to be able to publish the Work.

I haven't found a way to be able to do this.

#1482515

Hi Zayne,

Thank you for contacting us and I'd be happy to assist.

For what you're trying to achieve, you can use multiple Toolset Forms.

1. Form to add a new Work post - draft:
This form will be set to create a new post in CPT "Work" with post status "draft".
( ref: https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-creating-content/ )

You can include all the fields related to the data that you need from the user.

2. From to edit an existing Work post - draft:
This form will be set to edit an existing draft post in CPT "Work" and on form submission, it will keep the post status to "draft".
( ref: https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/ )

You can include the same fields as the first form in it and this will be used, when a user would like to make some changes to the already submitted draft post.

3. From to edit an existing Work post - publish:
This form will be set to edit an existing draft post in CPT "Work" too, but on form submission, it will change the post status to "published".

You don't need any input fields in this form other than the submit button as this form will only be used when a user would like to change the status of his draft post to published post.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1487857

Thanks Waqar! That makes sense.