PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Adding a 2nd USER Notification

  1. Any updates on the user notification conditional logic? Even with these conditionals I'm afraid it still would not be possible to add a 2nd user notification. Here's my issue:

    I've got a form which the user will populate with multiple email addresses, their's and their teacher's. I would like the Student to receive a completely different notification message than the teacher... possible? TIA

    Posted 12 years ago on Saturday October 8, 2011 | Permalink
  2. Can you use the admin notification for the teacher and the user notification for the student? If so, no problem: you can do that and have a different notification for teacher and student.

    Have you tried that and run into a problem doing it that way?

    Posted 12 years ago on Sunday October 9, 2011 | Permalink
  3. Thanks for the reply.

    I would do it that way, but the Admin notification must be submitted to 3 other e-mails. The piece that goes to the Admin, Teachers and Users all need to be completely different. Is there a way to do that?

    Posted 12 years ago on Sunday October 9, 2011 | Permalink
  4. So, you need three notifications, and each notification will be unique?

    Posted 12 years ago on Monday October 10, 2011 | Permalink
  5. Yep, that's it. I don't think that's currently possible but if it is, how?

    Thanks.

    Posted 12 years ago on Monday October 10, 2011 | Permalink
  6. Any ideas? Thanks

    Posted 12 years ago on Tuesday October 11, 2011 | Permalink
  7. It can be done if you really need to have all the notifications, but it will be a customization, not something built in to Gravity Forms. There are hooks available to change the notifications or run code after the form is submitted. So, you could send two notifications with the form builder, then use a hook to send a 3rd notification with PHP.

    http://www.gravityhelp.com/documentation/page/Developer_Docs

    Is it possible to just use the two built in notifications, and then have the admin log in to see the entries? Without knowing the differences between the notifications, it's hard to say if the amount of work required is justified, or if there is another work around.

    It can be done, but it's not built in, and would require some PHP code in your theme's functions.php

    Posted 12 years ago on Tuesday October 11, 2011 | Permalink
  8. I don't mind a little php work since i'm the developer of the theme... I would just like to be pointed in the right direction as far as what will be needed. My PHP knowledge is probably not where it SHOULD be so I will need a little bit of a helping hand when it comes to understanding what your hooks do.

    Thanks

    Posted 12 years ago on Tuesday October 11, 2011 | Permalink
  9. I think I would set up the admin and user notifications to handle your two most difficult notifications (most complex I guess) so that most of the work is done for you.

    For your third notification, you could the gform_notification_email filter, to just copy the admin email, make your changes, then use wp_mail() to send an additional (3rd) notification.

    Or, you if your email notification is more simple (on the order of "someone submitted a form" you can use the gform_pre_submission filter which runs after validation, but before notifications are sent. You can run a simple wp_mail() command using that hook.

    It all depends on how complex or different each notification is going to be, and where the email addresses are coming from (if they change, or are always the same.)

    Posted 12 years ago on Wednesday October 12, 2011 | Permalink
  10. Hmm. From what I can see that hook is used to change the admin email address, or the admin notification settings. Are there other parameters that can be used in place of this to add a tertiary notification? Please forgive my ignorance... I've looked through the documentation and the forums and haven't seen anything regarding this.

    Posted 12 years ago on Wednesday October 12, 2011 | Permalink
  11. We're just trying to find a hook that runs at the correct time, so you can run a separate function to send mail somewhere. We're taking advantage of a hook to run custom code that won't actually affect the form processing at all. We're going to run wp_mail() to send out a 3rd type of notification.

    Please share more details about your set up, what the notifications will look like, who will get them, and where the email addresses will come from. With more information I will be able to help you better.

    Thanks.

    Posted 12 years ago on Wednesday October 12, 2011 | Permalink
  12. The notification will need to be sent to an e-mail address field that is entered by the user and then inside the notification body there will be some standard text and a spot where the name of the user (another field) who submitted the form is placed.

    Posted 12 years ago on Wednesday October 12, 2011 | Permalink