PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Help with list field array filing to custom field

  1. Since it appears you cannot change the name value on an input field, I decided to take a try at using the gform_after_submission hook and see if I could file the form fields to the custom field in Wordpress. Surprisingly I'm almost there! Just need help with the array.

    Instructions is a 1 column list field and it's number 10. I'm trying to file this to a custom field called instruction.

    I'm using the following:

    function set_post_content($entry, $form) {
     $post = get_post($entry["post_id"]);
     $instructions = $entry[10];
     $post->post_content = $instructions;
     update_post_meta($entry["post_id"],'instruction',$post);
    }
    add_action("gform_after_submission_1", "set_post_content", 10, 2);

    After submitting the following:

    Step 1 instruction
    Step 2 instruction

    I'm seeing the following appear in the back end when it's filed to my custom post type:

    3
    1
    2
    0
    a
    T
    ...

    I think it's pieces of the array. What am I missing to allow it file the data correctly? Thank you!

    Posted 12 years ago on Friday January 6, 2012 | Permalink
  2. Nevermind I scratched gravity forms and created my own form instead.

    Posted 12 years ago on Saturday January 14, 2012 | Permalink