Plugin

Archived
Forum
(read-only)

Jeremy Worboys does not actively monitor this forum
(but you can still get help from other EE users).

Simple MailChimp

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Jeremy Worboys

     

You must be logged in to post.

Doesn’t display errors with custom code

Bug (Resolved)

anthonycollini
anthonycollini

Hello,

Purchased your add-on, but the plugin doesn’t display the returned errors using {error:EMAIL}. Instead it looks like it’s pulling styling from Mailchimp (see attached).

Also, when I enter an email address in the form, instead of using that email address, it sends a subscription email to the webmaster email associated in EE, not the one entered…

Please reply with a fix asap.

Thanks,

Anthony

Jeremy Worboys
# 1
Developer
Jeremy Worboys

Hi Anthony,

Thanks for purchasing.

The error you are seeing is the browser (Chrome, Safari, etc.) validation. My code pulls the field type from MailChimp (in this case email) and uses this as the “type” attribute on the input tag.

I am working on adding parameter that will allow you to disable this browser validation for the form.

Jeremy Worboys
# 2
Developer
Jeremy Worboys

I have added the fix for the emails only going to the webmaster in the 1.1.0 release.

Due to the way to form tags are generated I haven’t been able to find a simple way to disable validation across the whole form.

A work-around however is to use the new attr:ATTR params I have added. To stop validation on the email field use:

{merge:EMAIL attr:type="text"

This will output a text field instead of an email field and since text fields do not have validation you won’t have this problem. (Warning: this disables email validation on the server side as well, though it will still check that the field has a value.)

I would recommend leaving this as is however as the user will receive faster feedback (no page reload) which is better UX in my opinion.

I am going to leave this thread open in case others have any comments or suggestions.

anthonycollini
# 3
anthonycollini

Okay great, also please look at the actual email input. It seems to be sending to the webmaster email, not what’s entered in the actual input.

It looks like Line 89 you’re pulling webmaster email:
$MC->listSubscribe($list_id, $this->EE->config->item(‘webmaster_email’), $merge_vars)

Jeremy Worboys
# 4
Developer
Jeremy Worboys

I have added the fix for the emails only going to the webmaster in the 1.1.0 release.