I am not familiar with gravity form hooks. I have created 2 sign up process forms that are displayed in a single modal but called in different divs. I wanted to send these data from 2 forms to a third party application using gform_after_submission send entry data to third-party after submitting a specific form (last form).
However doing this:
add_action( 'gform_after_submission_2', 'post_to_third_party', 10, 2 );
function post_to_third_party( $entry, $form ) {
$post_url = 'http://thirdparty.com';
$body = array(
'first_name' => rgar( $entry, '1.3' ),
'last_name' => rgar( $entry, '1.6' ),
'message' => rgar( $entry, '3' ),
);
$request = new WP_Http();
$response = $request->post( $post_url, array( 'body' => $body ) );
}
will only allow me to get entry fields from the form id specified.
How would it be possible that I will get entries from other forms too so that I could include and post it to third party url?
Thanks ahead.