Skip Navigation

[Resolved] Add repeatedly relationship custom post at frontend

This support ticket is created 3 years, 11 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#1995229

Types date fields store values in Unix timestamp format, so you must convert the date input value to a Unix timestamp. You might be able to use PHP strtotime as shown in these examples:
https://stackoverflow.com/questions/30243775/get-date-from-input-form-within-php

if( $_POST['bod_0'] ) {
  $time = strtotime($_POST['bod_0']); // create a unix timestamp from date field value
  update_post_meta( $some_post_id, 'wpcf-date-field-slug', $time ); // set $time as date-field-slug custom field value for $some_post_id
}

You can verify the conversion is correct with a date-timestamp conversion tool: https://www.epochconverter.com/

#1995497

My issue is resolved now. Thank you!