I have further tried to get this working, but to no avail. When I turn on error reporting, I get the following results after submitting the form:
#anmeldung_kursauswahl# IS A FIELD#anmeldung_vorname# IS A FIELD#anmeldung_name# IS A FIELD
Notice: Undefined index: _ in /home/www/web287/html/swebdesign/test2/cfm/libraries/cck/base/form/store_inc.php on line 178
Fatal error: Cannot use object of type cpanelClass as array in /home/www/web287/html/swebdesign/test2/cfm/components/com_cck/controller.php on line 366
If I remove the AfterStore Plugin from the form, everything works fine. So I guess the problem is there.
Also, the Code used in the AFterStore Plugin works, i.e. the customer gets subscribed to acymailing.Here is the code used:
require_once(JPATH_ADMINISTRATOR.'/components/com_acymailing/helpers/helper.php');
$myUser = new stdClass();
$myUser->email = strip_tags(JRequest::getString('anmeldung_email')); //Please replace email_field by your own field name (the name of the field "email").
$myUser->name = strip_tags(JRequest::getString('anmeldung_name')); //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(2); //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);
You can also find a live version of the form with joomla and seblod debuggin turned on here:
http://test2.schifferliwebdesign.ch/cfm/kursdaten/kursauschreibungen/15-806.html
Any help would be greatly appreciated!