Support » Plugin: Participants Database » Send signup notification based on user selection

  • This is a really solid plugin! Thanks for great programming Roland.

    I’m trying to figure out if it’s possible to have a (drop down, list, or radio button) field on the signup form that lists a name which the form would be sent to, based on that choice. So, if it was a drop down, it would list:
    John Doe – <jdoe@email.com>
    Jane Doe – <janedoe@email.com>

    If Jane is selected, the email would be sent to jane’s email in addition to the email listed in the plugin’s settings.
    If John is selected, the email would be sent to jane’s email in addition to the email listed in the plugin’s settings.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author xnau webdesign

    (@xnau)

    Something like this can be done with some custom code, but if you want to avoid that, there is an add-on called Email Expansion Kit that can provide this kind of functionality and much more.

    Thread Starter rwilki

    (@rwilki)

    Thanks! Where would the code go? I’m guessing that I would need to create another field in my form and then somehow trigger the field to send the email to the value in the field. Any help would be great. If not, I understand…

    Plugin Author xnau webdesign

    (@xnau)

    Yes, you’re in the right track. Once you have a way to determine who the recipient should be from the submitted data (this can be another field in the form), you need to write a filter that will alter the recipient of the email.

    You’ll need to understand how WordPress filters work pretty good for this, it’s a bit complex, I’m just going to give you a quick outline the filters to use, assuming you know generally how to do this kind of thing.

    Your filter function should be on the pdb-before_signup_thanks filter. That is normally used to alter the reciept email that is sent to the user.

    In order to change where the notification email goes, however, you need to set another filter in your filter function that changes the recipient for the signup notification email.

    That filter is ‘pdb-email_signup_notify_addresses_setting_value’ you can change the default notification recipient there. You will have access to the submitted data in the ‘participant_values’ property of the first argument to the ‘pdb-before_signup_thanks’ filter.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Send signup notification based on user selection’ is closed to new replies.