2

I have built a public Member Directory using Searchkit and Formbuilder (https://cgdent.uk/member-register/[Member Register]1) and want to add a mailto-type link without exposing the member's preferred email address. (Separately, I will ensure "opt-in" for members who want this service). Is there a straightforward way to use SK/Afform to build this functionality?

8
  • You mean that you want to link to some type of webform that sends emails via CiviCRM to the member?
    – Coleman
    Commented Apr 22 at 18:24
  • Yes, that's right. Commented Apr 23 at 8:20
  • Well, your first step would be to create such a form on your site. Then you can link to it from the search display.
    – Coleman
    Commented Apr 23 at 17:20
  • I can see how to create such a form (Submission form) which creates an Activity, and assign the Current User as the source of the Activity. I can see how to pass the Contact ID of the intended recipient to the form (...member-message/#?id=[id]) but not how to pick up that ID in the Activity. Creating an Email Activity does not send it, so I wonder if I should be creating a bespoke Activity and then generating an email triggered by the creation of the Activity? Commented Apr 25 at 8:39
  • 1
    You can pick up the id by setting "Values" of the activity and choosing Contact 1 on the form. Bespoke activity + CiviRules or similar to send the email seems like a good way to go.
    – Coleman
    Commented Apr 25 at 14:32

1 Answer 1

1

A field placed on the form will pick up a value (with same field name) passed by URL to the form, and the form itself can be configured to reference the current user. So to create a messaging function from a member directory, the recipient can be stored in a custom activity as target_contact, current user as source contact, and a CiviRule created to send an email to the recipient (which is triggered by the creation of the Activity) to alert them to the new message, to which they are directed using a separate Search Form online. This way, no email addresses are exposed.

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.