Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

How to retrieve Date/Time field data from database?

$
0
0

Replies: 0

Hi,
I have created a couple of forms with NinjaForms that both require a Start date/time that I want to connect with another function that sends a notification (in BuddyPress); however I am struggling to find a way to retrieve the data; having looked in the database, it appears that date/time fields are saved as serialized data, but whatever I try I get a PHP error whenever I attempt anything. In testing I have tried get_posts then a foreach loop to echo the meta key value, WPQuery, with and without unserialize, but nothing works. I keep getting “PHP Fatal error: Uncaught Error: Object of class WP_Post could not be converted to string” in the error log. I am not an expert in this type of thing, and clearly it is possible to get this data as it is displayed in the submissions, so can someone please tell me how? I need it to be used in PHP in my child theme functions to trigger when a notification is sent, but this can’t be when the form is submitted, only the date/time input by the user. Thank you in advance to anyone who can assist.


Viewing all articles
Browse latest Browse all 59525

Trending Articles