Since there is no field that allows meto enter time I am using separate fields for days, hours, minutes and seconds but in order to be able to sort the results in View I need to convert them into "timestamp". Using MY CUSTOM FUNCTIONS plug-in by SPACE X-CHIMP I added following function to form:
add_action('cred_save_data_106', 'save_data_for_form_with_id_106',10,2);
function save_data_for_form_with_id_106($post_id, $form_data)
{
if ($form_data['id']==106) {
echo "I am here and MM equals ", $_POST['mm'];
if(isset($_POST['mm'])){
$time = $_POST['ss'] + $POST['mm'] * 60;
}
if(isset($_POST['hh'])){
$time = $time + $POST['hh'] * 3600;
}
if(isset($_POST['dd'])){
$time = $time + $POST['dd'] * 86400;
}
update_post_meta($post_id, 'czas-wyliczony-dla-wyniku', $time);
}
}
And... nothing happens to 'czas-wyliczony-dla-wyniku' field... what am I missing here?
As Types fields are prefixed with the wpcf-{your-field-name}. So if you created the custom field abc it will be stored within the database as postmeta key: wpcf-abc.
Can you please try above and try to resolve your issue.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.