So I’ve played a bit with the code and I have managed to load form in the CPT admin page, when the form is submitted, I’m able to hook the action and run my custom code, but I have no way of getting the post ID where this submission took place:
add_action( 'gform_after_submission_1', 'do_something', 10, 2 );
function do_something( $entry, $form ) {
global $post;
...
Any idea why $post is empty or a way of getting the $post value? Thanks!