BryanB Posted January 28, 2011 Share Posted January 28, 2011 I'm using the clientadd API and everything is working except the client custom fields. They are not saving at all... Here is what I have: $customfields = array( 'customfield[1]' => "customfield[1]", 'customfield[7]' => "customfield[7]", 'customfield[14]' => "customfield[14]", ); $postfields["customfields"] = base64_encode(serialize($customfields)); Does this look right? I'm not sure if I'm using the correct values. Here is what the form looks like: <td class="fieldarea">Your Website</td> <td><input type="text" size="30" name="customfield[1]" value=""> </td> Thanks! 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted January 28, 2011 WHMCS CEO Share Posted January 28, 2011 Hi, Close, but that's not quite right. The custom fields should be passed to the API like this: $customfields = array( '1' => "xxxxxx", '7' => "yyyyyyyyyy", '14' => "zzzzzzzz", ); $postfields["customfields"] = base64_encode(serialize($customfields)); Where 1, 7 and 14 are the field IDs from tblcustomfields. Matt 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.