Problem:
A Toolset Form is used to publish posts. A custom date field should store the time the form was submitted.
Solution:
You would use the cred_save_data hook to trigger code that sets a custom field value with the current timestamp using update_post_meta.
An example (which updates two custom fields) is given below: https://toolset.com/forums/topic/automatic-filling-date-fields/#post-1251117
Note that a simpler implementation would be to just use the standard post_date field of the post published with the form.
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
This topic contains 36 replies, has 3 voices.
Last updated by 5 years, 5 months ago.
Assisted by: Nigel.