Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: 4.7.2
-
Fix Version/s: Unscheduled
-
Component/s: CiviCRM Profile, CiviMail
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:Developer Doc
-
Funding Source:Needs Funding
Description
When using the AJAX interface to perform a "profile submit" API call to add a contact to a mailing list, the contact is created but not added to the group and no opt-in email is sent.
The call is performed as follow, from a Joomla custom content module :
CRM.api3('Profile', 'submit', { "profile_id": 20, "email-Primary": 'someone@somewhere.com' }).done(function(result) { console.info(result); });
Both the profile "Add new contacts to a Group" and CiviMail "Enable Double Opt-in for Profiles which use the Add to Group setting" are set.
It does work when using the HTML form snippet from the profile (contact created, added to group and opt-in email sent), but not when using the AJAX API call.
This has been lightly discussed in CRM-13234, but there is no documentation on how to get the profile submit API to add a contact to a group and send opt-in emails.