ChronoForm and AcyMailing
Description
Integration with ChronoForm
Integrate AcyMailing and ChronoForm using a PHP script
<?php
include_once(rtrim(JPATH_ADMINISTRATOR,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_acymailing'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helper.php');
$myUser = new stdClass();
$myUser->email = strip_tags(JRequest::getString('email_field')); //Please replace email_field by your own field name (the name of the field "email").
$myUser->name = strip_tags(JRequest::getString('name_field')); //Please replace name_field by your own field name (the name of the field "name").
$subscriberClass = acymailing_get('class.subscriber');
$subid = $subscriberClass->save($myUser);
$subscriberClass->sendConf($subid); //we send the confirmation email... only if needed based on the current user status and the option from the Acy configuration page.
$subscribe = array(3,4,5); //Specify here the ID of your lists separated by a comma, in this example the user will be subscribed to lists IDs 3,4 and 5.
$newSubscription = array();
if(!empty($subscribe)){
foreach($subscribe as $listId){
$newList = array();
$newList['status'] = 1;
$newSubscription[$listId] = $newList;
}
}
$subscriberClass->saveSubscription($subid,$newSubscription);
?> 



Integrate AcyMailing and ChronoForm using Curl




Curl method with ChronoForm v4

Integrate AcyMailing and ChronoForm using the redirect URL

Last updated