MailChimp
This is an open discussion with 109 replies, filed under Extensions.
Search
For anyone else wishing to use ajax, this has now been fixed by @nitriques, see here https://github.com/lewiswharf/mailchimp/pull/9
For anyone else wishing to use ajax, this has now been fixed by @nitriques, see here https://github.com/lewiswharf/mailchimp/pull/9
Main repo updated: http://symphonyextensions.com/extensions/mailchimp/
Hi! I would like to use ajax on my form but I still get this error: Uncaught ReferenceError: data is not defined
I read the last posts but I don't understand how I can resolve this issue. I'm using the last version of this extension on symphony 2.3.3.
Can you help me please?
Unfortunately the AJAX portion is not my strong area.
So... is there any plans to upgrade this extension to 2.4? I have installed it but I'm getting errors when I try to create new event.
Is there any other way to nicely integrate mailchimp on my site?
@Reygoch
Sorry I'm a little late… it depends what you want to do with MailChimp to be honest! Basic implementations don't really require the extension, from memory its strength exists where you want to use MailChimp whilst also storing any data captured by Symphony itself.
I would like to see it updated for 2.4/2.5 though - however I don't often use the extension so I'm afraid I won't get to dip in until the next project demands it.
What kinds of errors are you getting, out of interest? If you're lucky it just needs some deprecated functions replacing!
Hi I'm having problems chaining events with the mailchimp extension. It is working great as a standalone form but when I use my main form as the first event, which then chains to the mailchimp extension event I get the error 'Email invalid'.
Has anyone come across this before? Here is my event code if anyone can spot any glaring mistakes I would be grateful
protected function __trigger(){ include(TOOLKIT . '/events/event.section.php'); if($result->getAttribute('result') == "success") { $_POST['email'] = $_POST['fields']['tf-email']; $_POST['action']['subscribe'] = 'Submit'; redirect('/form-success/'); } return $result; }
The code you've posted has a couple of assumptions which aren't quite correct. While you are a correctly checking if this event has executed, and you are assigning the email to the $_POST
globals, the redirect()
function is going to immediately direct the browser to the form-success/
URL via GET, not POST. I'm then assuming your Mailchimp event is actually attached the form-success
page and the reason it's returning Email invalid
is simply because there is no POST data.
What I believe you can do instead is attach the mailchimp event to the same page as your existing event. Instead of doing the actual redirect, also try setting the redirect to be $_POST['redirect'] = '/form-success/'
.
Thanks for getting back to me Brendo, that makes sense. I did have the event attached to the same page as my existing event though, I changed the redirect as per your suggestion but unfortunately the page doesn't redirect as expected.
Do you have any idea where I am going wrong?
I have two pages - submit image and form success The main event 'submit-image' and the mailchimp event 'mailchimp' are both attached to the submit image page.
Below is the code I have for my form;
<form method="post" id="image-form" action="" enctype="multipart/form-data"> Your Name <input name="fields[tf-name]" class="event-input" type="text" tabindex="2" data-validation="required" /> Your Email Address <input name="fields[tf-email]" class="event-input" type="text" tabindex="3" data-validation="email" /> <input name="email" type="hidden" /> <input type="hidden" name="list" value="0b8f71997a" /> <input name="update_existing" type="hidden" value="yes" /> <input name="action[subscribe]" type="hidden" value="Submit" /> <input name="action[submit-image]" type="submit" class="buttons" value=" Submit " /> <input name="reset" class="buttons" type="reset" value=" Reset " /> <input name="fields[tf-published]" type="hidden" value="no" /> <input name="fields[tf-date-submitted]" type="hidden" value="{$this-day}-{$this-month}-{$this-year} {$current-time}"/>
My event trigger in the 'submit-image' event is;
protected function __trigger(){ include(TOOLKIT . '/events/event.section.php'); if($result->getAttribute('result') == "success") { $_POST['action']['subscribe'] = 'Submit'; $_POST['email'] = $_POST['fields']['tf-email']; $_POST['redirect'] = '/form-success/'; } return $result;
}
Thank you for your help, it is much appreciated
Create an account or sign in to comment.
Not true, Symphony is built to be agnostic about where you install it, as it is with URLs too. The problem is more than likely the extension.
As said on the issue tracker, I will have a look later.