Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter enack

    (@enack)

    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);
    }

    So delete cache whenever the red light blinks? It said 100% and naturally I thought that was a good thing. Defo would have been awesome to be notified of this throughout the download process as opposed to this link.
    gGod plugin though, needs a few improvements before 5 stars but that’s more to do with getting to know different environments

    Thread Starter enack

    (@enack)

    problem solved with upgrade, Thank you

    Thread Starter enack

    (@enack)

    Bare with me just doing the diagnoses now (except my apology for not doing this in advance im a beginner)

    • This reply was modified 7 years, 10 months ago by enack.
Viewing 4 replies - 1 through 4 (of 4 total)