3

We have a unique situation where we've built a Drupal View of CiviCRM contacts and want to provide a link to send an email through CiviCRM.

This can easily be done by using: www.mysite.org.uk/civicrm/activity/email/add?action=add&reset=1&cid=[id]&selectedChild=activity&atype=3

which will open a CiviCRM email activity with the person. So far, so good.

However, we also want to force a specific template to be used at that point. To prevent errors in selection. Is that possible to include in the URL?

1

2 Answers 2

1

Does it have to be through CiviCRM? It sounds like you just want a customizable contact form, which can be done on the drupal side - have you looked at potential drupal modules?

If the reason for CiviCRM is that you want a copy stored in their activity list, you could set up the module to bcc to an email address, and configure the civi email processor to retrieve them.

Or if you're up for customizing then a similar suggestion to Jaap's would be customizing the email template to make the same javascript call that the dropdown does, but do it on page load if the url contains your parameter. Depends if you feel more comfortable with front-end or back-end type of customization.

2
  • Thanks for the suggestion. We want to send a checksum token link and record the activity into CiviCRM and wanted to eliminate the possibility that they choose the wrong template.
    – Heather O.
    Jun 21, 2016 at 7:22
  • That sounds like a job for drupal.org/project/webform_civicrm
    – Coleman
    Oct 14, 2017 at 12:29
1

Sounds like you could achieve what you want by using Views to click through to a prefilled webform, with some Conditionals so you could set the 'body' of the email based on various 'templates' (aka markup fields in webform), then provided you include the contact.id and checksum options from the civicrm tab on the webform you can fire out a checksum just as you would with civicrm.

Your Answer

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

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