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!