Skip Navigation

[Resolved] Used a running number for post and set expired post

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

Problem:
How to add running number to custom field while creating posts using CRED form

Solution:
You should use CRED hook cred_save_data and add your custom programming within this hook to generate the running number.

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/used-a-running-number-for-post-and-set-expired-post/#post-651564

Relevant Documentation:
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

This support ticket is created 6 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
- 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 1 reply, has 2 voices.

Last updated by Minesh 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#650835

Hi there....

I've created the quotation form for my website. The form has Quote ID, Quote Name, Buyer, Supplier, Product and Quote date. I've created a quote post in post type. So, it will stored on quote post.

For this post, I want to used or created a running number such as Q-0001, then the next post should be Q-0002. Also I want each to set each post that created will expired in 24 hours.

Did any method that I can use to get what I want?

#651564

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - There is no such native feature available to generate the running number.

You should use CRED hook cred_save_data and add your custom programming within this hook to generate the running number.
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

To set post expiration for CRED - you can set post expiration settings. Please check following Docs:
=> https://toolset.com/documentation/user-guides/automatic-post-expiration/
=> https://toolset.com/documentation/user-guides/cred-training-course/part-4-setting-automatic-expiration-posts/