I am trying to add some custom meta data to a post and am trying to use gform_post_submission as I am using V1.5.
Below is the code/function I am supposed to be executing (inside my themes functions.php file), however the rows are not being created.
add_action("gform_post_submission_8", "create_services_listing_entry", 10, 2);
function create_services_listing_entry($entry, $form){
//getting post
$postid = get_post($entry["post_id"]);
//prepare the data for insertion into wp_postmeta
$ecpt_whmcsservicesid = $entry[23];
$ecpt_listingaddress = $entry[3];
$ecpt_listingtown = $entry[4];
$ecpt_listingpostcode = $entry[5];
$ecpt_listingcountry = $entry[6];
$ecpt_listingtel = $entry[7];
$ecpt_listingemail= $entry[9];
$ecpt_listingurl = $entry[9];
$ecpt_listingmainbanner = $entry[18];
$ecpt_listingkeywords = $entry[13];
//insert data into wp_postmeta
update_post_meta($postid, 'ecpt_whmcsservicesid', $ecpt_whmcsservicesid);
update_post_meta($postid, 'ecpt_listingaddress', $ecpt_listingaddress);
update_post_meta($postid, 'ecpt_listingtown', $ecpt_listingtown);
update_post_meta($postid, 'ecpt_listingpostcode', $ecpt_listingpostcode);
update_post_meta($postid, 'ecpt_listingcountry', $ecpt_listingcountry);
update_post_meta($postid, 'ecpt_listingtel', $ecpt_listingtel);
update_post_meta($postid, 'ecpt_listingemail', $ecpt_listingemail);
update_post_meta($postid, 'ecpt_listingurl', $ecpt_listingurl);
update_post_meta($postid, 'ecpt_listingmainbanner', $ecpt_listingmainbanner);
update_post_meta($postid, 'ecpt_listingkeywords', $ecpt_listingkeywords);
}
Any ideas what I am doing wrong here?