Ah ok good to know I guess that is just for backend debug but once again great tool.
Now I have created a Front end Form for editing as well only thing is to make changes to post satus via Post Editing front end from would be great if you can see it today and help me out further as well. Then I don't have to explain it to any one else.
If I remember well, you want to have a dropdown with all the statuses, so you can choose what status to set for the post, right? Or do you want to change to a specific status?
yes you are right as that a emplyee can change the post status so that based on that status posts are displayed on front end for all user.
But main concept is after post come .. it saved as draft or pending after review emply can either move it to publish or to trash and if select publish it should be published in view where only published posted are being showed to visitors
still waiting for your response.
Still waiting for your response ... stragen still no response ...
My apologies for the late reply, but I was not able to reply anytime sooner. I believe that I have already answered your question here https://toolset.com/forums/topic/update-post-status-from-the-frontend/#post-1910577 and I suggested implementing the solution here https://toolset.com/forums/topic/manage-native-wordpress-post-status-in-cred-form/#post-489972
So, I created a test site to show you how that's implemented. You can log in with this URL hidden link
The form is here hidden link
The view is in here hidden link
The custom code here hidden link
Form code:
[credform]
<div class="form-group">
<label>[cred_i18n name='generic-filed-status-label']Status[/cred_i18n]</label>
[cred_generic_field type='select' field='status']
{
"required":0,
"default":"0",
"options":[{"value":"0","label":"Select"},{"value":"draft","label":"Draft"},{"value":"pending","label":"Pending"},{"value":"publish","label":"Publish"}]
}
[/cred_generic_field]
</div>
[cred_field field='form_submit' output='bootstrap' value='Submit' class='btn btn-primary btn-lg']
[/credform]
Custom code:
add_action('cred_save_data','func_update_post_status',10,2);
function func_update_post_status($post_id,$form_data) {
if ( $form_data['id']==14 ) {
$my_post['ID'] = $post_id;
$my_post['post_status'] = $_REQUEST['status'];
// Update the post into the database
wp_update_post( $my_post );
}
}