• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

MailChimp revisited

JackGoa

Member
Hey guys, I really, really need that MailChimp plugin updated to the latest MailChimp API so I can integrate it properly with my websites.

What do I need to do to get a price from someone to do this? Just please tell me what to do. The longer I'm putting it off now, the more urgent it is becoming.

I've asked a few times now, but it always just ends up disappearing into the ether.

Please help!!?? :(
 
I committed updates to the Mailchimp plugin for the new API a few months ago, with support for the new 'interests' stuff. It's deployed on a couple of our direct client sites, working fine.

https://github.com/Fabrik/fabrik/tree/master/plugins/fabrik_form/mailchimp

I also added a new feature a few days ago to optionally use a checkbox on your form instead of the one added by the plugin to the bottom of the form.

I would have let you know, but I couldn't remember who it was had been asking me about it.

-- hugh
 
Whaaa!!?? Awesome!! Thanks so much Hugh!

I'd like to donate or do something towards it. What to do?

After all I did also request it and to show appreciation.
 
Ok sorry, I'm going to ask stupid questions now.

How do I download that plugin, or is it already included in the new Fabrik releases?
If not, can I just overwrite my old plugin after downloading it?
 
First off, I forgot to take out that sub! Doing it right now.

I only realised now, none of my sites where I use this plugin updates the Groups section in MailChimp since the update. Is there any way to fix this? That said, how hard is it to add the functionality to update/change more than one group?

See attached file to see what I am referring to.

I use this feature quite extensively to update users and emails are sent out based on the groups they join.
 
That JSON doesn't look right - that looks like the old groups format with the group name, not the new Interests format. Interests should be an ID that look something like this:

[{"58d1ec4981":true}]

As per the tooltip, you have to get the Interest ID from their API "playground". It's ridiculously difficult, they don't provide an easy way to find out the ID. Here's a Stack Exchange discussion on the topic:

https://stackoverflow.com/questions...chimp-interest-group-id-without-using-the-api

And here's a little screencast showing you where I got the id for the example above.

https://www.screencast.com/t/rEhkavrM

Another wrinkle is that if you have more than 10 lists, the Playground UI only shows you the first 10 and no obvious way to paginate. I managed to work round that on another account, but I can't exactly remember how.

It really is insane that they don't make that ID visible anywhere in the dashboard, and if you Google the subject, you'll find it's been an issue many people have complained about since v3 was introduced.

-- hugh
 
At some point I may get froggy and add a special JForm field type to grab the interests and groups through the API (using the key specified in the settings), so I can provide a dropdown of available ID's, with their coresponding names, so you can just pick from a list. But that's a couple of hours coding, which I can't justify until there's a significant number of people subscribing to use this code.

-- hugh
 
Ah sherbet Hugh, sorry forgot to add I did figure that part out. Yes, they sure did not make it easy. And I do have a few lists.

I see you use the square brackets in your example, I did not use it and it still works. Is it important?

Please do feel froggy! Look, I'll even make a plan and subscribe to Standard Support for a few more months if that is what it would take to make this plugin fully integrated and awesome?

My question now relates more to the update part. For instance, on my one list I send new subscribers back to another form where I ask them various questions. Due to only being able to update one group/interest thingy, up until now I would go in once a week and update new subscribers manually, one by one with all the interests they ticked.
Is it possible now to update to Mailchimp all the interests (about 4 or 5 different groups with 3-5 interests per group) they ticked? If yes, how would the format for that look?
 
As per the tooltip, you can add as many interest ID's as you want, and use element placeholders to set the values. The way the new interests work is that they are either 0 or 1 (or true or false). And as the tooltip says, "is the value of the placeholder is anything but empty or 0, the interest will be selected".

So, for example, to set two interests, one always set, and the other dependent on an element ...

[{"58d1ec4981":true,"67fg848c746":"{yourtable___yourelement}"}]

So say yourtable___yourelement is a checkbox, with values of 0 and 1, a selection of 1 will enable that interest, 0 will disable. And it should work in edit mode, ie. if they've already submitted the form, then edit and submit again, unselecting 'yourelement', they will be removed from that interest.

Note that you'll probably need to append _raw, as usual with placeholders for elements with "value" and "label", so get the value.

-- hugh
 
Awesome!

So just to be clear, for a checkbox, which has "value" for the checkobox, I would append _raw?

If a client updates a MailChimp form, would it update back to Fabrik?
 
So just to be clear, for a checkbox, which has "value" for the checkobox, I would append _raw?

Yes. And to re-iterate, a value of 0 or an empty string is "false", anything else is "true". So 1, Yes, 321, Some Random Text, etc are all "true". Only 0 or nothing are "false".

If a client updates a MailChimp form, would it update back to Fabrik?

Nope. It's a one way thing, updating MailChimp from a Fabrik form submission.

-- hugh
 
In the case of a radio button, do I have to update the ID for each interest, or can I set it to only update the group ID and it will know which option was selected?
 
Not sure what you mean.

As mentioned above, a value of 0 is "false" for a given interest, anything else is "true". So if your "Group 1" interest is ID 1234567, and you have a radio button "group1" for "Yes" or "No" (values 0 and 1) to sub to that group ...

[{"1234567":"{yourtable___group1_raw}"}]

Are you trying to combine multiple interests into a single radio button? Like a radio for "Group 1" or "Group 2" or "Group 3"?

If so, I haven't tried it, but this might work:

Set the value of the radio selections to the interest ID, so "Group 1" is "1234567", and ...

["{yourtable___group1_raw}":"1"}]

Note however that this wouldn't un-sub them from the other group(s). So if they submitted with Group 1, then edited the form and re-submitted with Group 2, they would then wind up sub'ed to both.

-- hugh
 
I have 4 groups. 3 of them each have 3 radio button options, the 4th group is a bunch of checkboxes.

So how I have it now is, I have the ID for each Interest (not group) and I have them all setup like this:
[{"479879853":"{yourtable___group1_raw}"}]
(for the radio buttons I did not use _raw, only the checkbox ID's has the _raw part)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top