Skip Navigation

[Resolved] How to define date fields that are automatically filled in or updated

This support ticket is created 5 years, 6 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
- 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 3 replies, has 2 voices.

Last updated by Luo Yang 5 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#1315987

In most databases you can tell a date field to
a) automatically have the record creation date
b) automatically update to the current date when the record changes

How do I achieve this behaviour in Toolset? There seems to be no such option when I create a custom field in a custom post type.

– Martin

#1316021

Hello,

You can try the post's modified date, for example:
Modified on [wpv-post-date type="modified"]

See document
https://codex.wordpress.org/Function_Reference/the_modified_date
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-date

#1318465

Hi Luo

So I don't need a custom field at all but can use the standard post date – is that what you are saying?

I will try that, thank you.

– Martin

#1318673

Hi Martin,

You are right, you don't need custom field, just need to use WordPress built-in feature: post's modified date.

Please let me know if you need more assistance for it. thanks