Problem:
I have a CPT called Events. I use a Types date/time field for the event date and time. The event start time is always 7:00 PM.
However, PHP 7.2 makes the use of $this as a function parameter a Fatal Error. Here is the code I currently have that fails in PHP 7.2:
https://toolset.com/forums/topic/how-to-set-a-default-value-for-date-time-field-in-cpt/#post-1204861
Solution:
It is a custom codes problem, see example codes here:
https://toolset.com/forums/topic/how-to-set-a-default-value-for-date-time-field-in-cpt/#post-1205239
Relevant Documentation:
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 5 years, 7 months ago.
Assisted by: Luo Yang.