Hi Janizde thanks for getting back to me
I was given a code that uses gravity form fields to add to a custom post, I was wondering if you can see any reasons why the hours fields are not being added (Im a newbie). Thanks
//Create opening hours
add_action(“gform_after_submission_11”, “create_new_set”, 10, 2);
function create_new_set($entry, $form){
//First need to create the post in its basic form
$new_set = array(
‘post_title’ => ucwords($entry[15]),
‘post_status’ => ‘publish’,
‘post_author’ => 16, // this represents admin by default.
‘post_type’ => ‘op-set’,
‘timeStart’ => (entry[1]),//this will represent the form field that has a time field in it
‘timeEnd’ => (entry[2]),
);
$post_id = wp_insert_post($new_set);
}