New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single subscribe/unsubscribe page #237
Comments
You can achieve this with a custom controller that subscribes/unsubscribes a contact to mailing lists: https://putyourlightson.com/plugins/campaign#subscribing-a-contact-to-a-mailing-list Alternatively, if you cannot create a custom controller, then you could implement this on the front-end using JavaScript, by calling the front-end form action endpoints: https://putyourlightson.com/plugins/campaign#front-end-forms We are aware that this could be made simpler so I'll leave this feature request open and hopefully we can add at some point in future. |
Added the ability to bulk subscribe/unsubscribe an existing contact from one or more mailing list using a front-end form in 2.14.0. <h3>Subscribed Mailing Lists:</h3>
{% for mailingList in craft.campaign.mailingLists.all() %}
<label for="{{ mailingList.slug }}">{{ mailingList.title }}</label>
<input type="hidden" name="mailingList[{{ mailingList.id }}]" value="0">
<input id="{{ mailingList.slug }}" type="checkbox" name="mailingList[{{ mailingList.id }}]" value="1" {{ contact.isSubscribedTo(mailingList) ? 'checked' }}>
{% endfor %} See the full example in the docs at https://putyourlightson.com/plugins/campaign#contact-update-form |
We use different mailing lists and in these again some lists. Now it would be quite time-consuming to create a separate unsub page for each list and link it to the templates.
My idea is to loop over all mailinglists and the lists contained in them to give the user the choice of subscribing or unsubscribing from all lists or just some of them in one place. Like in the screenshot.
Mailinglist 1
Mailinglist 2
E-Mail field
The text was updated successfully, but these errors were encountered: