This question refers to CampaignMonitor API PHP wrapper, function subscriberAddWithCustomFields().
In the CampaignMonitor back-end I created a custom multi-option (select many) field called ‘Subscribedto’ where the user can select (checkbox) which newsletter he likes to receive: ‘News & Updates’ and/or ‘News from Partners’. Now I would like to update this field using the PHP API wrapper but can’t figure out how to do this.
From my database:
‘News & Updates’ can be either 0 or 1
‘News from Partners’ can be either 0 or 1
The following does not work:
$extras = array('Subscribedto'=>array("News & Updates"=>0,"News from Partners"=>1));
$cm_res = $cm->subscriberAddWithCustomFields($email,$name, $extras);
Their new v3 API makes this a lot easier. See http://www.campaignmonitor.com/forums/viewtopic.php?id=5166 in their forums for an answer.
Here’s some sample code from one of my forms: