• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Custom Script, submit to Campaign Monitor

Custom Script, submit to Campaign Monitor 14 years 6 months ago #8981

Hi, I am trying to write a custom script to use the campaign monitor api to add the submissions name and email to my campaign monitor list. I had this working fine with my custom contact form, but when I copy the same code into the "Process on form submit" area it doesn't work. Is there an easy way to debug these scripts? Echoing stuff doesn't seem to do any good because it gets redirected... Below is the code I have right now, the actual form is at yourstrategicedge.com/contact-test.html for now, once this is solved I will be taking that down though :)

$api_key = 'xxxx';
$client_id = null;
$campaign_id = null;
$list_id = 'xxxx';
$cm = new CampaignMonitor( $api_key, $client_id, $campaign_id, $list_id );

//Optional statement to include debugging information in the result
//$cm->debug_level = 1;

/*Name for last name field in CM*/
$actual_CM_lastname = 'Last Name';

$CM_result = $cm->subscriberAddWithCustomFields($_POST, $_POST, array($actual_CM_lastname => $_POST));
if($CM_result != 0)
echo = 'Campaign Monitor Error : ' . $CM_result . '<br>';
Last Edit: 14 years 6 months ago by strategicedge.
The administrator has disabled public write access.

Re:Custom Script, submit to Campaign Monitor 14 years 5 months ago #9029

I am trying to do the same thing, did this get fixed?
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!