If I stand correct if I wanted to subscribe a new user to a list, I should use the data mapping.

I used this
p[2]: '2'
to subscribe to list 2. But the new subscription is in ActiveCampaign, but not in the list provided.

What am i doing wrong? And can't this be a option like it is for e-mail, first name and last name?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pollegie created an issue. See original summary.

dtfabio’s picture

Hi pollegie,

It is not yet possible at the moment to subscribe a user to a specific list, the webformhandler just sends the data through to Active Campaing.

To forward fields other than email, first name and last name, custom yaml mapping can be used.

This yaml mapping does not allow you to pass your own parameters to the api.

I will change the sentence "Edit the form data that will be sent to the ActiveCampaign site when a webform submission is made" to "To send additional fields other than the three basic fields provided, the custom yaml mapping can be used." in the description of the custom yaml field, because that may have caused the confusion.

We are, however, looking internally at providing this functionality in the new version of Active campaign, along with other features to give more flexibiliteit to users of the module.

I hope this answers your question?

Greetings,

Fabio

pollegie’s picture

Hi dtfabio,

that answers it for now. I would love to see this function in an upcoming version.

Thanks for the answer!

dtfabio’s picture

Version: 1.0.0-beta3 » 2.0.x-dev
Component: User interface » Code
Category: Support request » Feature request
Issue tags: +2.x Roadmap

You're welcome pollegie,

I'm glad my explanation helped.

I'm adjusting the ticket description a bit so that this can be included as one of the 2.x roadmap tickets as a feature request.

This will also keep you informed once the feature is added to the module.

Greetings,

Fabio

elaman’s picture

For those who are looking for a solution, you are welcome in testing this module: https://www.drupal.org/project/simple_activecampaign

cmarrufo’s picture

Status: Active » Needs review
StatusFileSize
new2.75 KB
new54.27 KB
new56.27 KB
new35.28 KB
new24.53 KB
new69.14 KB

Hello, attached patch here that provides this functionality. With this patch, a user can subscribe to a specific list, which is configured through the ActiveCampaignFormHandler in the activecampaign_webform submodule.

To explain this in more detail, to do this, you must add the Active Campaign handler to your webform. Once added, you'll see a new checkbox field. If you select it, a dropdown list will appear with your Active Campaign platform's lists. Here are some screenshots:

- Checkbox unchecked:
checkbox unchecked

- Checkbox checked, showing select list:
checkbox checked

Testing with temp mail

Test email: dadaci5185@amgens.com

- User doesn't exist.
test email 1

- Filling out the form
test email 2

- User created and subscribed to correct list.
test email 3

sebastiendaled-rosseel’s picture

Assigned: Unassigned » sebastiendaled-rosseel
Status: Needs review » Active
Issue tags: +ddd2025
pollegie’s picture

I use patch #6 a few weeks now, and works like a charm!

cmarrufo’s picture

Status: Active » Reviewed & tested by the community

Hi @pollegie I'm glad to hear that; I'll mark this issue as reviewed. Thank you very much!.

dtfabio changed the visibility of the branch 3328991-cant-subscribe-to to hidden.

dtfabio’s picture

dtfabio’s picture

Tested activecampaign module versions:

  1. 1.0.0-rc1
  2. 1.0.0-beta4

I tested the change on two clean Drupal instances, versions 10.5.8 and 11.2.10, both on PHP 8.3.

I also tested it on one of our existing projects that uses ActiveCampaign Core version 10.4.9 and PHP 8.1, and it works without any problems on all sites.

Users are also correctly registered in the designated list.

The MR pipelines are also green, so I will merge this into the 2.x branch and cherry pick it to the 1.x branch.

I will work through the tickets where patches have been submitted to see if they can also be merged, then create a new release with these changes.

  • dtfabio committed 56aaf66e on 2.0.x
    feat: #3328991 Can't subscribe to a list
    
    By: dtfabio
    By: pollegie
    By:...

  • dtfabio authored 5caf7578 on 1.x
    feat: #3328991 Can't subscribe to a list
    
    By: dtfabio
    By: pollegie
    By:...
dtfabio’s picture

Status: Reviewed & tested by the community » Fixed

Merged in 2.x and cherry picked on to the 1.x branch.

Thank you for providing this @cmarrufo. :)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

dtfabio’s picture

Assigned: dtfabio » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.