Jump to content

Support ticket with costum field


StORE

Recommended Posts

Hello,

want to make a script when adding a new ticket to a department add my support and costum fields

NAMESERVER1 and NAMESERVER2

in file have:

$postfields["action"] = "openticket"; 
 $postfields["clientid"] = $clientid;
 $postfields["deptid"] = "17";
 $postfields["subject"] = "Schimbare Nameservere"; // romanian language
 $postfields["message"] = $_POST['mesaj']; // romanian language
 $postfields["priority"] = "Low";

I do not know how to do this

 $postfields["customfields"] = base64_encode(serialize(array("1"=>"$ns")));

 

 

Sorry for my english :)

Link to comment
Share on other sites

Basically what you need to do is create an array of your custom fields and then serialize and encode them.

 

For example, say the field ids for your custom fields were 1 and 2 it would look something like this

 


$custom_fields = array("1" => "ns1.yourdomain.com","2" =>"ns2.yourdomain.com");

$postfields["customfields"] = base64_encode(serialize($custom_fields)));

 

You can find the field ids for your custom fields by looking in the tblcustomfields table.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated