Skip Navigation

[Resolved] Send emails/notifications to all the result of a view search

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Author
Posts
#598730

My dream is to have a view that can be searched and to be able to send an email/notification to everyone in the list created from that search (the email field will be visible in the view).
Is there any way to create a list from all the emails displayed on the page after the search and add the comma separated emails to a the "To: " field from Cred? Something similar to the way that maps work (on the map will be visible the locations displayed on the page).

What is the link to your site?
hidden link

#598832

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Razvan

This is not something you can readily do without a reasonable amount of customisation.

You can't send a notification to a list of emails using the normal CRED settings, only to an individual email address that comes from a field in the form, so to send to a list you will need to use the CRED API and the cred_notification_recipients hook (https://toolset.com/documentation/programmer-reference/cred-api/#cred_notification_recipients).

You'll need to make the list of emails available by including them in the CRED form somehow. The easiest way is probably to include a field which you hide with CSS, and when your View updates with a list of email addresses, you use JavaScript to copy that list across to your CRED form field. The CRED form itself might just look like a send button, with the hidden email list field, and a hidden automatically-generated title field (a CRED form must include a post title).

If you try the above and need help, let me know, but if it is not something you think you are able to do you could try contacting one of the contractors listed here: https://toolset.com/contractors/