AnsweredAssumed Answered

Where in the Marketo UI do you see leads that are added through custom forms?

Question asked by e8205e81607d40e873434a4d84288906df80aa66 on May 27, 2016
Latest reply on Aug 22, 2016 by 985653e943447cef2fbac9b1a5189255a6c2c53a

Hi,

I have the following PHP code (in WordPress) which I use to create a lead form a contact form 7 form:

 

add_action("wpcf7_before_send_mail", "sendDetailsToMarketo");

function sendDetailsToMarketo($cf7){

  $munchkinId = isset($_POST[$array[$cf7->id()]['munchkinId']]) ? $_POST[$array[$cf7->id()]['munchkinId']] : "";

  $formid = isset($_POST[$array[$cf7->id()]['formid']]) ? $_POST[$array[$cf7->id()]['formid']] : "";

  $firstName = isset($_POST[$array[$cf7->id()]['FirstName']]) ? $_POST[$array[$cf7->id()]['FirstName']] : "";

  $lastName = isset($_POST[$array[$cf7->id()]['LastName']]) ? $_POST[$array[$cf7->id()]['LastName']] : "";

  $email = isset($_POST[$array[$cf7->id()]['Email']]) ? $_POST[$array[$cf7->id()]['Email']] : "";

 

  $url = 'https://app-sj02.marketo.com/index.php/leadCapture/save';

  $myvars = 'munchkinId=' . $munchkinId . '&formid=' . $formid . '&FirstName=' . $firstName . '&LastName=' . $lastName . '&Email=' . $email;

 

  $ch = curl_init( $url );

  curl_setopt( $ch, CURLOPT_POST, 1);

  curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);

  curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);

  curl_setopt( $ch, CURLOPT_HEADER, 0);

  curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);

 

  $response = curl_exec( $ch );

 

  return $response;

}

 

Where do I see in the marketo ui the lead that is generated?

Outcomes