2

I was looking around but haven't been able to find an obvious answer to my question, but has anyone ever dealt with a newsletter signup block or page just for site visitors? I've been trying to find examples but it doesn't really seem as though anyone's ever required this. We'd like to move our current newsletter signup form over to CiviCRM just so everything is all handled in one place, but I'm stuck as to how to accomplish this.

I'd appreciate any help or advice - Matt

1

2 Answers 2

5

There are two ways to do this in Drupal.

CiviCRM Profiles

  • Go to Administer » System Settings » Misc, and set Accept profile submissions from external sites to Yes.
  • Create a profile in CiviCRM with the "Add to Group" option set to add someone to the group in question.
  • Once the profile is created, select its more menu » HTML Form Snippet (see screenshot).
  • Paste the HTML snippet into a Drupal block. Handle access to the block like any other Drupal block.

SPECIAL NOTE: This creates a bit of a security issue - when you enable the "Remote Profile Submissions", anyone who knows what your profiles are can add contacts to your system by recreating the form on a remote site. If you choose this path, consider editing your web server to block access to profile URLs by IP address.

Webform CiviCRM integration

Alternatively, you can use Webform-CiviCRM integration to build webforms to handle this. This is much more flexible, but can be trickier to get right, depending on your needs. I'd probably try this first.

Bonus: WordPress edition

  • Create a profile in CiviCRM with the "Add to Group" option set to add someone to the group in question.
  • Use a shortcode to drop the profile into a page. Use the Shortcode Widget if you want to drop it into a sidebar.

enter image description here

1
  • I tried the Shortcode Widget you recommended and placed the widget in the left column of a footer, but it doesn't appear. I'm WP 4.9.8 and Civi 4.7.29, and here is the shortcode I put in the widget: [civicrm component="profile" gid="17" mode="create" hijack="0"]. The test shortcode "[shortcode_widget_test]" does work, so it seems to be a Civi-related problem (?). Can anyone help?
    – Ruth D
    Commented Dec 2, 2018 at 1:08
3

I'd highly recommend a page as opposed to a block. If you use a block, you can't put a captcha on it. And I can tell you from experience that it will be hit by Russian bots like CRAZY!

Create your profile. Make sure you have it set to be used for "Standalone Form or Directory".

On the profile listings page - http://www.yourdomain.com/civicrm/admin/uf/group?reset=1 - click on the "more" link to get a pop-up. Then choose "Use - Create Mode". That will open up the link that you can send visitors to in order to fill out the form.

I've switched to this method instead of a block so that I can have a captcha on the page. I still have a block about subscribing, it just links folks to this page instead of having the form there.

Hope this helps!

Create mode

2
  • 1
    To latch on to the getting a lot of bots signing up. We use a profile that adds to a group for our newsletter but also turned on the "Enable Double Opt-in for Profiles which use the 'Add to Group' setting" in the CiviMail Compenent settings.
    – RayWright
    Commented Jan 23, 2018 at 3:36
  • Yes, thank you. I thought I was missing something in addition to the captcha. :) Commented Jan 23, 2018 at 3:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.