I am trying to change the post type of the form data but it seems like gform_post_data
is not firing at all. The file is included while execution i.e. a die()
in the file halts everything but inside the function nothing is executed, so I think gform_post_data
filter is not even firing on my setup.
add_filter( "gform_post_data", "ft_gf_change_post_type", 10, 2 );
function ft_gf_change_post_type( $post_data, $form ) {
$post_data["post_type"] = "job";
return $post_data;
}
Also on Gist: https://gist.github.com/1363676
P.S. I have gone through the forums a lot, the same filter is working for everyone but not me. Any suggestions what could be failing here?