Skip to main content
correct URL
Source Link
artfulrobot
  • 4k
  • 16
  • 33

I think you can do this using CiviCRM Profiles. Ish.

  1. Create a profile (Administer » Customise Data and Screens » Profiles)

  2. Open the profile's Advanced Settings and look for "Add new contacts to a group" and select the new mailing group you want to invite people into.

  3. Save the profile then add any fields you want the user to be able to see/edit.

  4. Now you have a form that users can use to add themselves into your database and onto your new list, you just need to provide people with a special link in your email. Read on.

  5. In the profiles page, identify the ID of the new profile, which will be a number. I'm going to pretend mine is 123 for this example.

  6. Draft a mailing. Add a link with whatever text you want and craft a URL like this (Drupal example, enjoy adjusting for WP/joomla at your leisure):

     https://yourdomain.com/civicrm/profile/edit?reset=1&id=reset=1&gid=123&id={contact.contact_id}&gid=123&{contact.checksum}
    
  7. Send yourself a test mailing and open the link in a not-logged in browser ( e.g. use a "Private Browsing" or "Incogneto" tab. You should see a form and if you submit that form you should be added to your new group.

Yes but I want a one-click solution!

Yes I didn't miss that, which is why I said this was an "ish" solution. You could achieve this, if really necessary, by including custom javascript on the profile form that automatically submitted the form as soon as the page loads.

This sounds quirky but has other advantages too, well, one, which is that it saves your link from being "clicked" by spam/virus checkers that may scan the email before it lands in the recipients inbox. If it was a 'open this link and something gets changed' then these automated systems would mess it up for you quite a lot. But these automated systems won't execute javascript, so that way you get the functionality without the side effects. I believe this is how (and why) Mailchimp do this on their unsubscribe links.

Q. How to include javascript on a particular profile form? Try hook_civicrm_buildProfile

(EDIT: corrected the magic link above - it was previously taking you to just a view, not an edit form.)

I think you can do this using CiviCRM Profiles. Ish.

  1. Create a profile (Administer » Customise Data and Screens » Profiles)

  2. Open the profile's Advanced Settings and look for "Add new contacts to a group" and select the new mailing group you want to invite people into.

  3. Save the profile then add any fields you want the user to be able to see/edit.

  4. Now you have a form that users can use to add themselves into your database and onto your new list, you just need to provide people with a special link in your email. Read on.

  5. In the profiles page, identify the ID of the new profile, which will be a number. I'm going to pretend mine is 123 for this example.

  6. Draft a mailing. Add a link with whatever text you want and craft a URL like this (Drupal example, enjoy adjusting for WP/joomla at your leisure):

     https://yourdomain.com/civicrm/profile/edit?reset=1&id={contact.contact_id}&gid=123&{contact.checksum}
    
  7. Send yourself a test mailing and open the link in a not-logged in browser ( e.g. use a "Private Browsing" or "Incogneto" tab. You should see a form and if you submit that form you should be added to your new group.

Yes but I want a one-click solution!

Yes I didn't miss that, which is why I said this was an "ish" solution. You could achieve this, if really necessary, by including custom javascript on the profile form that automatically submitted the form as soon as the page loads.

This sounds quirky but has other advantages too, well, one, which is that it saves your link from being "clicked" by spam/virus checkers that may scan the email before it lands in the recipients inbox. If it was a 'open this link and something gets changed' then these automated systems would mess it up for you quite a lot. But these automated systems won't execute javascript, so that way you get the functionality without the side effects. I believe this is how (and why) Mailchimp do this on their unsubscribe links.

Q. How to include javascript on a particular profile form? Try hook_civicrm_buildProfile

(EDIT: corrected the magic link above - it was previously taking you to just a view, not an edit form.)

I think you can do this using CiviCRM Profiles. Ish.

  1. Create a profile (Administer » Customise Data and Screens » Profiles)

  2. Open the profile's Advanced Settings and look for "Add new contacts to a group" and select the new mailing group you want to invite people into.

  3. Save the profile then add any fields you want the user to be able to see/edit.

  4. Now you have a form that users can use to add themselves into your database and onto your new list, you just need to provide people with a special link in your email. Read on.

  5. In the profiles page, identify the ID of the new profile, which will be a number. I'm going to pretend mine is 123 for this example.

  6. Draft a mailing. Add a link with whatever text you want and craft a URL like this (Drupal example, enjoy adjusting for WP/joomla at your leisure):

     https://yourdomain.com/civicrm/profile/edit?reset=1&gid=123&id={contact.contact_id}&gid=123&{contact.checksum}
    
  7. Send yourself a test mailing and open the link in a not-logged in browser ( e.g. use a "Private Browsing" or "Incogneto" tab. You should see a form and if you submit that form you should be added to your new group.

Yes but I want a one-click solution!

Yes I didn't miss that, which is why I said this was an "ish" solution. You could achieve this, if really necessary, by including custom javascript on the profile form that automatically submitted the form as soon as the page loads.

This sounds quirky but has other advantages too, well, one, which is that it saves your link from being "clicked" by spam/virus checkers that may scan the email before it lands in the recipients inbox. If it was a 'open this link and something gets changed' then these automated systems would mess it up for you quite a lot. But these automated systems won't execute javascript, so that way you get the functionality without the side effects. I believe this is how (and why) Mailchimp do this on their unsubscribe links.

Q. How to include javascript on a particular profile form? Try hook_civicrm_buildProfile

(EDIT: corrected the magic link above - it was previously taking you to just a view, not an edit form.)

added 106 characters in body
Source Link
artfulrobot
  • 4k
  • 16
  • 33

I think you can do this using CiviCRM Profiles. Ish.

  1. Create a profile (Administer » Customise Data and Screens » Profiles)

  2. Open the profile's Advanced Settings and look for "Add new contacts to a group" and select the new mailing group you want to invite people into.

  3. Save the profile then add any fields you want the user to be able to see/edit.

  4. Now you have a form that users can use to add themselves into your database and onto your new list, you just need to provide people with a special link in your email. Read on.

  5. In the profiles page, identify the ID of the new profile, which will be a number. I'm going to pretend mine is 123 for this example.

  6. Draft a mailing. Add a link with whatever text you want and craft a URL like this (Drupal example, enjoy adjusting for WP/joomla at your leisure):

     https://yourdomain.com/civicrm/profile/viewedit?reset=1&id={contact.contact_id}&gid=123&{contact.checksum}
    
  7. Send yourself a test mailing and open the link in a not-logged in browser ( e.g. use a "Private Browsing" or "Incogneto" tab. You should see a form and if you submit that form you should be added to your new group.

Yes but I want a one-click solution!

Yes I didn't miss that, which is why I said this was an "ish" solution. You could achieve this, if really necessary, by including custom javascript on the profile form that automatically submitted the form as soon as the page loads.

This sounds quirky but has other advantages too, well, one, which is that it saves your link from being "clicked" by spam/virus checkers that may scan the email before it lands in the recipients inbox. If it was a 'open this link and something gets changed' then these automated systems would mess it up for you quite a lot. But these automated systems won't execute javascript, so that way you get the functionality without the side effects. I believe this is how (and why) Mailchimp do this on their unsubscribe links.

Q. How to include javascript on a particular profile form? Try `hook_civicrm_buildProfilehook_civicrm_buildProfile

(EDIT: corrected the magic link above - it was previously taking you to just a view, not an edit form.)

I think you can do this using CiviCRM Profiles. Ish.

  1. Create a profile (Administer » Customise Data and Screens » Profiles)

  2. Open the profile's Advanced Settings and look for "Add new contacts to a group" and select the new mailing group you want to invite people into.

  3. Save the profile then add any fields you want the user to be able to see/edit.

  4. Now you have a form that users can use to add themselves into your database and onto your new list, you just need to provide people with a special link in your email. Read on.

  5. In the profiles page, identify the ID of the new profile, which will be a number. I'm going to pretend mine is 123 for this example.

  6. Draft a mailing. Add a link with whatever text you want and craft a URL like this (Drupal example, enjoy adjusting for WP/joomla at your leisure):

     https://yourdomain.com/civicrm/profile/view?reset=1&id={contact.contact_id}&gid=123&{contact.checksum}
    
  7. Send yourself a test mailing and open the link in a not-logged in browser ( e.g. use a "Private Browsing" or "Incogneto" tab. You should see a form and if you submit that form you should be added to your new group.

Yes but I want a one-click solution!

Yes I didn't miss that, which is why I said this was an "ish" solution. You could achieve this, if really necessary, by including custom javascript on the profile form that automatically submitted the form as soon as the page loads.

This sounds quirky but has other advantages too, well, one, which is that it saves your link from being "clicked" by spam/virus checkers that may scan the email before it lands in the recipients inbox. If it was a 'open this link and something gets changed' then these automated systems would mess it up for you quite a lot. But these automated systems won't execute javascript, so that way you get the functionality without the side effects. I believe this is how (and why) Mailchimp do this on their unsubscribe links.

Q. How to include javascript on a particular profile form? Try `hook_civicrm_buildProfile

I think you can do this using CiviCRM Profiles. Ish.

  1. Create a profile (Administer » Customise Data and Screens » Profiles)

  2. Open the profile's Advanced Settings and look for "Add new contacts to a group" and select the new mailing group you want to invite people into.

  3. Save the profile then add any fields you want the user to be able to see/edit.

  4. Now you have a form that users can use to add themselves into your database and onto your new list, you just need to provide people with a special link in your email. Read on.

  5. In the profiles page, identify the ID of the new profile, which will be a number. I'm going to pretend mine is 123 for this example.

  6. Draft a mailing. Add a link with whatever text you want and craft a URL like this (Drupal example, enjoy adjusting for WP/joomla at your leisure):

     https://yourdomain.com/civicrm/profile/edit?reset=1&id={contact.contact_id}&gid=123&{contact.checksum}
    
  7. Send yourself a test mailing and open the link in a not-logged in browser ( e.g. use a "Private Browsing" or "Incogneto" tab. You should see a form and if you submit that form you should be added to your new group.

Yes but I want a one-click solution!

Yes I didn't miss that, which is why I said this was an "ish" solution. You could achieve this, if really necessary, by including custom javascript on the profile form that automatically submitted the form as soon as the page loads.

This sounds quirky but has other advantages too, well, one, which is that it saves your link from being "clicked" by spam/virus checkers that may scan the email before it lands in the recipients inbox. If it was a 'open this link and something gets changed' then these automated systems would mess it up for you quite a lot. But these automated systems won't execute javascript, so that way you get the functionality without the side effects. I believe this is how (and why) Mailchimp do this on their unsubscribe links.

Q. How to include javascript on a particular profile form? Try hook_civicrm_buildProfile

(EDIT: corrected the magic link above - it was previously taking you to just a view, not an edit form.)

Source Link
artfulrobot
  • 4k
  • 16
  • 33

I think you can do this using CiviCRM Profiles. Ish.

  1. Create a profile (Administer » Customise Data and Screens » Profiles)

  2. Open the profile's Advanced Settings and look for "Add new contacts to a group" and select the new mailing group you want to invite people into.

  3. Save the profile then add any fields you want the user to be able to see/edit.

  4. Now you have a form that users can use to add themselves into your database and onto your new list, you just need to provide people with a special link in your email. Read on.

  5. In the profiles page, identify the ID of the new profile, which will be a number. I'm going to pretend mine is 123 for this example.

  6. Draft a mailing. Add a link with whatever text you want and craft a URL like this (Drupal example, enjoy adjusting for WP/joomla at your leisure):

     https://yourdomain.com/civicrm/profile/view?reset=1&id={contact.contact_id}&gid=123&{contact.checksum}
    
  7. Send yourself a test mailing and open the link in a not-logged in browser ( e.g. use a "Private Browsing" or "Incogneto" tab. You should see a form and if you submit that form you should be added to your new group.

Yes but I want a one-click solution!

Yes I didn't miss that, which is why I said this was an "ish" solution. You could achieve this, if really necessary, by including custom javascript on the profile form that automatically submitted the form as soon as the page loads.

This sounds quirky but has other advantages too, well, one, which is that it saves your link from being "clicked" by spam/virus checkers that may scan the email before it lands in the recipients inbox. If it was a 'open this link and something gets changed' then these automated systems would mess it up for you quite a lot. But these automated systems won't execute javascript, so that way you get the functionality without the side effects. I believe this is how (and why) Mailchimp do this on their unsubscribe links.

Q. How to include javascript on a particular profile form? Try `hook_civicrm_buildProfile