Hi there,
I am not 100% sure how to use the gform_disable_post_creation hook to update a post. Could you post a quick example on how to use that hook. The documentation gives this example to disable post creation:
<?php
add_filter("gform_disable_post_creation", "disable_post_creation", 10, 3);
function disable_post_creation($is_disabled, $form, $entry){
return true;
}
?>
So if I wanted to disable post creation and update a post instead, how would I do this lets say for form id 6? Like below?
<?php
add_filter("gform_disable_post_creation_6", "my_update_post", 10, 3);
function my_update_post($is_disabled, $form, $entry){
wp_update_post($post_id); // not sure about the right syntax here
return true;
}
?>
Which information would I have to pass to wp_update_post and how would I take this information from that just filled out form? Would I also need to use the gform_after_submission hook? Which hook gets fired first?