I don't know where I'm going wrong, but it's not processing.
I'm putting in the processing option after sending the form, same option as acymailing, correct ..!?
//!--- Start Acymailing ---!//
//!--- Serve para registrar no Acymailing ---!//
$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['nome']);
//Custom fields
$customFields = [];
$customFields['3'] = strip_tags($postData['celular']); // $customFields['3'] refers to Acymailing's custom field ID
$customFields['6'] = strip_tags($postData['profissao']);
$myUser->id = $userClass->save($myUser, $customFields);
$listToSubscribe = [2]; // list id's to subscribe to
$userClass->subscribe($myUser->id, $listToSubscribe);
//!--- End Acymailing ---!//