0

あなたたちが助けてくれるかどうか疑問に思っています。Gravity フォームを Eloqua CRM と統合しようとしています。「サードパーティ統合」プラグインの両方を試しました。また、functions.php ファイルに送信後の gf 関数を追加しようとしました。しかし、私はこれを機能させることができませんでした。私のコードは以下です。「eloqua」に自分のフォームの URL を入力しました ( https://s1913652004.t.eloqua.com/e/f2 ) フォーム ID もありますが、それを配置する場所がどこにもありません。

add_action( 'gform_after_submission_1', 'post_to_third_party', 10, 2 ); function post_to_third_party( $entry, $form ) {

$post_url = 'https://s1913652004.t.eloqua.com/e/f2';
$body = array(
    'first_name' => rgar( $entry, '1.3' ), 
    'last_name' => rgar( $entry, '1.6' ), 
    'email' => rgar( $entry, '2' ),
    'country' => rgar( $entry, '3' ),
    );
GFCommon::log_debug( 'gform_after_submission_1: body => ' . print_r( $body, true ) );

$request = new WP_Http();`enter code here`
$response = $request->post( $post_url, array( 'body' => $body ) );
GFCommon::log_debug( 'gform_after_submission_1: response => ' . print_r( $response, true ) );
4

1 に答える 1