• RsForm integration Acymailing Issue

Hi

I want to integrate Acymailing with RSform.
Iam follwing this documentation
https://www.acyba.com/acymailing/127-acymailing-rsformpro.html
but i need some customization.

I have 3 columns
In each column i have one image and one checkbox. So each column have your own checkbox.
Each checkbox have just one option..
So i want one checkbox with image.

My user can choose one or two or all checkboxes.

My problem is how use the script in the documentation?

Thanks in advance

The script is to use in Acymaling 5... i want to use in new 6

Hi,

This is the script your can use in RSForm in combination with Acymailing v6.


$postData = JRequest::getVar('form');
if(empty($postData['Nieuwsbrief'])) return;

include_once(rtrim(JPATH_ADMINISTRATOR,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_acym'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helper.php');

$userClass = acym_get('class.user');

$myUser = $userClass->getOneByEmail(strip_tags($postData['Email']));

if (empty($myUser)) {
$myUser = new stdClass();
}

$myUser->email = strip_tags($postData['Email']);
$myUser->name = strip_tags($postData['Name']);

$myUser->id = $userClass->save($myUser);

$listToSubscribe = [1, 2, 3];
$userClass->subscribe($myUser->id, $listToSubscribe);