ipaddress Posted September 2, 2009 Share Posted September 2, 2009 I am adding clients throguth API interfase, but I can´t insert the custom client field, beacause it is not especified in add clients API specification. Is it posible? regards 0 Quote Link to comment Share on other sites More sharing options...
verdictjosh Posted September 4, 2009 Share Posted September 4, 2009 Anybody want to answer? I would like to know also! 0 Quote Link to comment Share on other sites More sharing options...
ffmpeg Posted September 4, 2009 Share Posted September 4, 2009 Current API does not seem to offer adding custom field may be API needs to be worked again. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted September 4, 2009 Share Posted September 4, 2009 This sniplet should work for you to update your customfields Just add it in to your existing code where you define the postfields $customfields = array( '1stcustomfieldname' => "1st customfield value", '2ndcustomfieldname' => "2nd customfield value", '3rdcustomfieldname' => "3rd customfield value", ); $postfields["customfields"] = base64_encode(serialize($customfields)); 0 Quote Link to comment Share on other sites More sharing options...
hmc Posted March 1, 2010 Share Posted March 1, 2010 ok, but how it will look like if in form I have inputs with 12 months: <select name="customfield[9]"><option value="Month">Month</option><option value=" January"> January</option><option value=" February"> February</option><option value=" March"> March</option><option value=" April"> April</option><option value=" May"> May</option><option value=" June"> June</option><option value=" July"> July</option><option value=" August"> August</option><option value=" September"> September</option><option value=" October"> October</option><option value=" November"> November</option><option value=" December"> December</option></select> 0 Quote Link to comment Share on other sites More sharing options...
letshost Posted March 16, 2010 Share Posted March 16, 2010 the cusotmer fileds is used to for create additional fields for product , not for domains. JiJi 0 Quote Link to comment Share on other sites More sharing options...
madpato Posted March 19, 2010 Share Posted March 19, 2010 i have a similar problem i just need to put an aditional field on my register client form with that sniplet i could do it? its just a field that requests an ID number (which is mandatory) 0 Quote Link to comment Share on other sites More sharing options...
Mahmudul Posted September 24, 2011 Share Posted September 24, 2011 (edited) This sniplet should work for you to update your customfieldsJust add it in to your existing code where you define the postfields $customfields = array( '1stcustomfieldname' => "1st customfield value", '2ndcustomfieldname' => "2nd customfield value", '3rdcustomfieldname' => "3rd customfield value", ); $postfields["customfields"] = base64_encode(serialize($customfields)); Hi sparky, I have the similar issue. I tried the above code but it didn't add any custom values. I tried the sample code from WHMCS API. Here are the post fields: $postfields["action"] = "addclient"; $postfields["firstname"] = "Test"; $postfields["lastname"] = "User"; $postfields["companyname"] = "WHMCS"; $postfields["email"] = "demo@whmcs.com"; $postfields["address1"] = "123 Demo Street"; $postfields["city"] = "Demo"; $postfields["state"] = "Florida"; $postfields["postcode"] = "AB123"; $postfields["country"] = "US"; $postfields["phonenumber"] = "123456789"; $postfields["password2"] = "demo"; $postfields["currency"] = "1"; $customfields = array( 'CUSTOMFIELDS1' => "127.0.0.1", 'CUSTOMFIELDS2' => "localhost" ); $postfields["customfields"] = base64_encode(serialize($customfields)); I.v been trying for couple of days to figure it out. But still no luck. Can you please help? Thanks in advance. [Edit]: The response what I am getting regarding that client is: [CLIENT] => Array ( [uSERID] => 35 [iD] => 35 [FIRSTNAME] => Test [LASTNAME] => User [COMPANYNAME] => WHMCS => demo@whmcs.com [ADDRESS1] => 123 Demo Street [ADDRESS2] => [CITY] => Demo [sTATE] => Florida [postCODE] => AB123 [COUNTRY] => US [COUNTRYNAME] => United States [PHONENUMBER] => 123456789 [NOTES] => [PASSWORD] => ee61ea3aa1706328bcf73fb3b10f0def:(KjMa [CURRENCY] => 1 [CCTYPE] => [CCLASTFOUR] => [sECURITYQID] => 0 [sECURITYQANS] => [GROUPID] => 0 [sTATUS] => Active [CREDIT] => 0.00 [TAXEXEMPT] => [LATEFEEOVERIDE] => [OVERIDEDUENOTICES] => [sEPARATEINVOICES] => [DISABLEAUTOCC] => [LANGUAGE] => [LASTLOGIN] => Date: 22/09/2011 13:32<br>IP Address: 205.251.135.186<br>Host: webhostingbuzz.com [CUSTOMFIELDS1] => [CUSTOMFIELDS2] => [bILLINGCID] => 0 [CURRENCY_CODE] => GBP ) -Mahmudul Edited September 24, 2011 by Mahmudul 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.