Skip Navigation

[Resolved] Split: fields and text > adding a form – cred auto_draft

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by Minesh 2 years ago.

Assisted by: Minesh.

Author
Posts
#2682241

now, my most important question....

what is a CRED Auto Draft fa5bc50a5629810d60ca390873691b8c error? why does it show this error when I post a new item on my content template? hidden link

why are all new submission my subscribers turning into this error hidden link ??? help me please

thank you...

#2682243

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

You must created those posts using the Toolset post form where you did not added the post title field for your post form.

If above is the case:
- Do you want to add meaningful post title to your post using any custom field you have on your post form?

Please check the following related ticket:
- https://toolset.com/forums/topic/prevent-cred-auto-draft-creation/

#2682292
new dog book entry form final.jpg

firstly, I already saw this after google search upon encountering error https://toolset.com/forums/topic/prevent-cred-auto-draft-creation/ it is not useful or valuable or meaningful to me as a person encountering this exact problem. I just want you to know that. you should actually delete that because it is confusing, and instead, add this issue to your documentation.

alright, to get to the question, I think you're right, I must have deleted the post title?? so the post form must have a "post title" to work correctly? I guess this is correct because I made a test post form and I see that the "post title" is a default .

And, to answer your question, well, my so-called "meaningful" post title is the Dog's Name. See the attached screenshot of the post form.

Can you tell me what I should do to over come this?

you can see with this entry I did while logged in with admin it is perfect result hidden link
but this one done with test user is CRED error hidden link

I must have deleted the post title between making these two test entries?

Basically I just want the title of the post to be the Dogs Name.

So how do I add the title back? or should I re-do the form or what? What is the solution?

thank you

#2682298

OK, I figured it out. I fixed it.

But please do tell me why this is designed this way?

And is there any other workaround? I bet in some cases the client cannot find a work around. I bet there is a way. Please tell me how to fix it if there is another way. I bet there is.

I really like this plugin and I like your documentation. I think this plugin is easy to use. I think your side did a good job of teaching how to use it. I figured out how to use it perfectly in less than 4 hours. I am not mad at all. I like it a lot.

But you should really just get to the point in a support ticket. Maybe you are used to newbs.

And trust me, I run dozens of ecomm, blog and affiliate sites, this https://toolset.com/forums/topic/prevent-cred-auto-draft-creation/ is not good for your company's support team. its actually confusing. you should delete it and make a post addressing this error. just my 2 cents.

thanks and have a nice day!

#2682377

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for your feedback that you like Toolset plugins and its easy to use and it will help you to make your development journey smooth.

The thing is you should note down that as I shared before, if there is no native post title field added, the default title will be the "CRED Autodraft...".

The ticket I linked is about "Auto-drafts" that are created automatically due to error. That is not related to your issue now as you shared that those "Auto-drafts" posts are created using Toolset form and the title of the remains "Auto-draft" its because the post title field is not added to form.

If you want to have meaningful post title - you can use "cred_save_data" hook that will help you to update the post title automatically once you submit your form while creating new posts.

- You can add the following code to "Custom Code" section offered by Toolset by creating new code snippet.
More info:
=> https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/

For example (don't forget to activate the code snippet) :

add_action('cred_save_data','func_generate_automatic_post_title', 10, 3);
function func_generate_automatic_post_title($post_id,$form_data) {
    if ($form_data['id']==99999) {
        
          $field_slug = 'dog-name';

          $post_title= get_post_meta($post_id, 'wpcf-'.$field_slug, true);
          $args = array('ID' => $post_id, 'post_title' => $post_title, 'post_name'  => sanitize_title( $post_title) );
          wp_update_post($args);
    }
}

Where:
- Replace 99999 with your original form ID
- Replace $field_slug variable value with your original custom field slug of Dog name if required.

More info:
- https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

I hope this clarifies everything and let me know. Please open a new ticket with every new question you may have. This will help other users searching on the forum as well as help write correct problem resolution summery for original issue we handle with current ticket.

Thank you for your time and patient. Have a great day!!

#2682383

OK thanks for that. but no, I am not going to be using any custom code. Bro, as soon as you start talking about custom code my eyes roll back in my skull. no no.....I wont use this if I have to have special code just so I dont have to force using a post title. my friend, the post title has no functionality. it cannot be styled. and if this "Cred" error happens when the post title is deleted then why allow the user to delete it?

So many questions for you, but too little time.

I like this plugin but I question its long term viability. are you still updating it?

#2682385

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

it cannot be styled. and if this "Cred" error happens when the post title is deleted then why allow the user to delete it?
===>
Its because when user do not want to use post title - they allowed to delete it but at the same time they will have to accept that if there is no post title, the post title field value will be replaced with "CRED Autodraft".

Ok if you do not want to use the Toolset form hook "cred_save_data" then the only way to add the title is you should add the post title field to your form and with new post you will try to add using the Toolset form, you will see the title as you added with the form.

I still suggest you should either use post title field and add it to your form or use Toolset form hook I shared to update post title based on your "Dog Name" custom field.

I like this plugin but I question its long term viability. are you still updating it?
-->
yes - we offer updates on regular basis. You can keep your eyes on our blog page for latest updates.
- https://toolset.com/blog/