Skip Navigation

[Resolved] date stamp

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

Problem:

1) Is there a way to have a auto date stamped when a custom type is filed out?

2) the account is being created or a special notation is being logged onto a customer. The person who checks it forgets the to input the date. is there a way to have it added the time and date of change?

3) if I have multiple managers accessing the information is there a way to track who made the change along with the date and time?

Solution:

A1) You can use the post's created date, for example:
Published on [wpv-post-date format="F jS, Y"]

A2) You can setup another custom date field, for example "my-date", create a Toolset form for editing the post, in form content display that custom date field, then users will be able to change the custom date field value.

Then in front-end, use wpv-conditional shortcode to check date field "my-date" value, if it is empty, display the post's created date

A3) There isn't such kind of built-in feature, you might consider custom codes, for example:

1) Create a new custom post type "my-post-modified", setup one-to-many between your custom post type and "my-post-modified"

2) Create a Toolset form for editing post of your your custom post type, when the managers submit the edit form, use action hook cred_save_data to trigger a PHP function

3) In this PHP function, create a new "my-post-revisions" post, and related it with current post

Relevant Documentation:

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

https://developer.wordpress.org/reference/functions/wp_insert_post/

https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts

This support ticket is created 6 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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by acts-1224C 6 years ago.

Assisted by: Luo Yang.

Author
Posts
#1157148

Tell us what you are trying to do?

Tell us what you are trying to do?
membership and classified sites

Is there a way to have a auto date stamped when a custom type is filed out? the account si being created or a special notation is being logged onto a customer. The person who checks it forgets the to input the date. is there a way to have it added the time and date of change? if I have multiple managers accessing the information is there a way to track who made the change along with the date and time?

Thanks

#1157617

Hi,

Q1) Is there a way to have a auto date stamped when a custom type is filed out?
You can use the post's created date, for example:
Published on [wpv-post-date format="F jS, Y"]
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-date

Q2) The person who checks it forgets the to input the date. is there a way to have it added the time and date of change?
You can setup another custom date field, for example "my-date", create a Toolset form for editing the post, in form content display that custom date field, then users will be able to change the custom date field value.

Then in front-end, use wpv-conditional shortcode to check date field "my-date" value, if it is empty, display the post's created date

Q3) is there a way to track who made the change along with the date and time?
There isn't such kind of built-in feature, you might consider custom codes, for example:
1) Create a new custom post type "my-post-modified", setup one-to-many between your custom post type and "my-post-modified"
2) Create a Toolset form for editing post of your your custom post type, when the managers submit the edit form, use action hook cred_save_data to trigger a PHP function
3) In this PHP function, create a new "my-post-revisions" post, and related it with current post

More help:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
https://developer.wordpress.org/reference/functions/wp_insert_post/
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts

#1158192

My issue is resolved now. Thank you!