StORE Posted September 18, 2012 Share Posted September 18, 2012 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 0 Quote Link to comment Share on other sites More sharing options...
StORE Posted September 19, 2012 Author Share Posted September 19, 2012 help please? 0 Quote Link to comment Share on other sites More sharing options...
StORE Posted September 23, 2012 Author Share Posted September 23, 2012 help ??? 0 Quote Link to comment Share on other sites More sharing options...
jclarke Posted September 23, 2012 Share Posted September 23, 2012 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. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.