html newsletter signup form keeps breaking... Help!!!

Permalink
Greetings all,

So I'm trying DESPERATELY to get this thing to work. I've copied and pasted the HTML from an icontact.com email marketing signup form onto my site but whenever it's placed in the sidebar or footer section, it doesn't work!

Please check it out, it does work when placed into the main block on the page (using Slate theme by c5mix).

http://affordableonlinesolutions.net/blog/...

THANK YOU!

 
McCormick replied on at Permalink Reply
McCormick
Mike, have you checked out the following addons in Concrete5's marketplace?


Email List Signup (free addon, a "package" by C5 guru jordanlev)
http://www.concrete5.org/marketplace/addons/email-list-signup/...

Mailer (free addon)
http://www.concrete5.org/marketplace/addons/mailer/...

I'll take a look at your site and post feedback here in the next minutes.
McCormick replied on at Permalink Reply 1 Attachment
McCormick
The one in both my attachment here and the main area of your website works correctly, right?

I see in your source code that you're using the same script for multiple signup forms on the same page. That confuses me and your JavaScript at least. You should use the script on a single page only once; otherwise, multiple instances of any single script can clash with each other and screw up stuff like document.getElementByID.

<script type="text/javascript">// <![CDATA[
var icpForm2031 = document.getElementById('icpsignup2031'); // you have multiple instances of this ID sprinkled throughout your code. Each element should have a unique ID.
if (document.location.protocol === "https:")
   icpForm2031.action = "https://app.icontact.com/icp/signup.php";
function verifyRequired2031() {
  if (icpForm2031["fields_email"].value == "") {
    icpForm2031["fields_email"].focus();
    alert("The Email field is required.");
    return false;
  }
return true;
}
// ]]></script>
mike706 replied on at Permalink Reply
Thanks so much for your reply, I had NO IDEA the java scripts could clash with one another like that!

I will check out those add ons and hopefully that'll fix it.

Any other workaround for making the signup form possible in multiple areas of the page? I need it on the sidebar, footer, and within each individual article.

Thanks again!!!
Michael
McCormick replied on at Permalink Reply 2 Attachments
McCormick
Yup, check out the attached screenshots. The addon by jordanlev allows multiple instances of its signup form, the "action" attribute of which includes a unique "bID," according to its respective block:

<form method="post" action="/index.php?cID=132&bID=112&arHandle=Main&ccm_token=1386288574:b5b8a14a44cb77df8c1aaf89eb2495cf&btask=passthru&method=submit_form">


The success message doubles up. You could of course make a few tweaks to the addon's inner-workings, such as view.css and view.php, to tailor the script to your liking.
mike706 replied on at Permalink Reply
Wowza! So if I could find out where to locate the block ID I think my best bet would be to modify the HTML I'm already using (this is tied into my email marketing service) and add in the ID to allow multiple instances of Java on the page.

Where can I locate the block ID (as in your example) to put it into each signup form's code?

Thanks!
McCormick replied on at Permalink Reply
McCormick
I would avoid tinkering with any concrete5 block ID to make room for a third-party script. The marketer works for you, right? The company in that case should take care of its clients, and probably could issue a second and third script to you to allow you to implement multiple instances of the same form, each of which would have its own code and unique attributes including IDs, on a single page.
McCormick replied on at Permalink Reply
McCormick
And I see a silhouette of the Big Island in your header. You kama'aina, brah? I grew up in Kaneohe, on Oahu.
mhawke replied on at Permalink Reply
mhawke
Sorry Mike706 but Block IDs don't work like that. The same block has a different Block ID throughout it's life on your site so you can't just add a single fixed ID number to your form.

You should check out some of the extended forms in the marketplace because you pay for them once instead of paying a fee every month to icontact.com

A lot of these external form services also load their own copy of jQuery which can clash with concrete5's own version of jQuery that gets loaded automatically.