Hi,
I have looked at the various documentation for the API, but still seem to be having trouble getting the resulting ticket description to be formatted correctly. I apologize if I have missed something.
I am trying to use the API to create a ticket which needs to include various information from a database. Here is the relevant snippets of code based on the example api.php file:
-----
$message .= $title . '<br>';
$message .= '<p>' . $referrer . '</p><p>Hours:Min (' . $hrs . ':' . $min . ')</p>';
$data = array(
'name' => 'Test Proctor', // from name aka User/Client Name
'email' => $user, // from email aka User/Client Email
'dept' => 'NPI', // phone number aka User/Client Phone Number
'subject' => 'API Test: ' . $title, // test subject, aka Issue Summary
'message' => "data:text/html;charset=utf-8,$message", // test ticket body, aka Issue Details.
'ip' => $_SERVER['SERVER_ADDR'], // Should be IP address of the machine thats trying to open the ticket.
'topicId' => '1', // the help Topic that you want to use for the ticket
'attachments' => array()
);
----
Where $title, $referrer, $hrs, and $min are variables pulled from the database.
Unfortunately, when I look at the ticket created, all the html tags are ignored. I'm thinking there is just something I'm missing or is set wrong.
Help?
I have looked at the various documentation for the API, but still seem to be having trouble getting the resulting ticket description to be formatted correctly. I apologize if I have missed something.
I am trying to use the API to create a ticket which needs to include various information from a database. Here is the relevant snippets of code based on the example api.php file:
-----
$message .= $title . '<br>';
$message .= '<p>' . $referrer . '</p><p>Hours:Min (' . $hrs . ':' . $min . ')</p>';
$data = array(
'name' => 'Test Proctor', // from name aka User/Client Name
'email' => $user, // from email aka User/Client Email
'dept' => 'NPI', // phone number aka User/Client Phone Number
'subject' => 'API Test: ' . $title, // test subject, aka Issue Summary
'message' => "data:text/html;charset=utf-8,$message", // test ticket body, aka Issue Details.
'ip' => $_SERVER['SERVER_ADDR'], // Should be IP address of the machine thats trying to open the ticket.
'topicId' => '1', // the help Topic that you want to use for the ticket
'attachments' => array()
);
----
Where $title, $referrer, $hrs, and $min are variables pulled from the database.
Unfortunately, when I look at the ticket created, all the html tags are ignored. I'm thinking there is just something I'm missing or is set wrong.
Help?