• <?php
    // // accept all post data and make array
    $data = json_decode(file_get_contents('php://input'), true);
    if (!$data) {
    $data = $_POST;
    }
    var_dump($data); // // get the data from the array
    $deal_name = "test";
    // $deal_source = isset($data['deal_source']) ? $data['deal_source'] : "";
    $contact_first_name = isset($data['yrname']) ? $data['yrname'] : "";
    // $contact_last_name = isset($data['contact_last_name']) ? $data['contact_last_name'] : "";
    $contact_email = isset($data['yremail']) ? $data['yremail'] : "";
    echo $contact_email ;
    $contact_phone = isset($data['telephone']) ? $data['telephone'] : "";
    $contact_message = isset($data['yrmessage']) ? $data['yrmessage'] : "";
    
    $data_string = json_encode(array(
    "custom_fields" => array(),
    "email" => $contact_email,
    "first_name" => $contact_first_name,
    "last_name" => "WA",
    "is_public" => true,
    "phone" => $contact_phone
    ));

    i use this code code to fetch cf7 data to send to crm. but form data is not being fetched.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CF7 input not fetching’ is closed to new replies.