Adding the form in WordPress sidebar?

Hello, is it possible to add a CM subscribe form to a WordPress sidebar? I saw the AJAX plugin but I have a hidden field (the source of signing up) and don't know how that can be implemented using the plugin.

Is there another way to add the sign up form to a sidebar - can I just copy/paste the CSS version or the Form version right into the widget?

Thanks for any suggestions,
Julia

roshodgekiss roshodgekiss, 4 years ago

Hi Julia, my advice would be either to copy/paste our provided AJAX subscribe form code into the HTML sidebar widget in WordPress and take it from there, or edit the code in 'Themes' directly. Both require a little confidence with coding, but these are most probably the best options at present. Let me know if you have any questions about this :)


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
julia, 4 years ago

Thank you for the reply.

I'm not sure I understand the part of the Google Analytics. I don't see where I'm supposed replace anything in the javascript for the fake pageview.

roshodgekiss roshodgekiss, 4 years ago

Hi Julia, we're very sorry about this - I believe this was relevant to the previous version of the AJAX form, but should have been omitted during the latest update. I've now removed these details - thanks for pointing this out :)


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
julia, 4 years ago

Thank you! I have it now. Is there a way to make the name fields *required? I wasn't sure if the AJAX script allowed for this.

roshodgekiss roshodgekiss, 4 years ago

You will have to add your own validation code to make fields 'required' - by default, only email address is mandatory. Here's a primer on how to do this - hope this helps!


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
julia, 4 years ago

Perfect, thanks!

julia, 4 years ago

Well, I thought I had it worked out. I put the validation script in the /head but it's not working. Does the AJAX script override the javascript that is in the /head section? Because the First Name & Last Name fields are not validating.

Any help would be appreciated.

roshodgekiss roshodgekiss, 4 years ago

Hi Julia, it's probably best that you either contact our team or post your code in our API Developer forum. While there is server-side validation at work with our First Name and Last Name fields, it's hard to say if it's interfering with the code you have in place. Thanks for persevering with this!


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098