Hey there. I don’t know if this feature is in v3.0 but is it possible to send an email notification when an event is submitted through the public submission form? Thanks!
you can do this now in a custom module using the onAfterPublicSubmission handler (onAfterPublicSubmission - LiveWhale Support).
The command to send the mail is documented here:
https://support.livewhale.com/live/blurbs/lw-functions#Sending-Email
Best,
-= G =-
Thanks Gian! I appreciate the feedback. I read the section you linked to and unfortunately, I’m a LiveWhale noob and need more instruction than what’s provided there. Is this a new custom module? What is the exact structure of file? Etc. Thanks! - Adam
you might already have a module for public submissions - each site is different so I’m not sure. You might look in /livewhale/client/modules/ and see whether anything looks like it might be related to public submissions. If there is one, you could put your email code in there - see whether there is already code for the onAfterPublicSubmission handler and you could just add to that. If not, you’ll need to add a method for that handler, and be sure to add it to the module’s handlers array in REGISTERED_APPS in the declaration at the top of the module code.
If there isn’t already a module, you’ll need to make one following the documentation here: Module Development - LiveWhale Support - note that there example uses a different handler so you’ll need to adjust accordingly.
When you are writing modules, using the debug function can be very helpful to see what’s going on: $_LW Functions - LiveWhale Support
If you need more, feel free to reach out directly and we can set something up…
gcervone@brockport.edu
Best,
-= G =-
Thank you, sir! I’ll give that a shot. I’m wondering if this is all going to change in V3. We found the public submission email in public.config.php but that was just for the Public group. We changed all our submissions to got to a different group, so that didn’t work. The documentation says you can do it for a different group but what we tried that and it didn’t work. We’re going to try to get on V3 ASAP so hopefully we’ll be able to see if anything changes and go from there. Thanks again!
Hi all,
I wanted to mention, the custom module version Gian Carlo suggests is maybe the “advanced mode” for sending an email notification when a public submission is made
– built into LiveWhale 2.x and 3.x you can use a more straightforward config option
Docs: Receiving Notifications of public submissions
Hope this helps!
Karl
Thanks Karl!
Yeah, the only wrench in the works is that we changed (but changed back) all submissions to go to the Main calendar by default. That breaks the Public notification unfortunately. I’m 99% sure that you said that the default action will be submitting to the Main calendar for V3. Please correct me if I’m wrong though. If so, is there a way to receive emails for events submitted to the Main calendar? The documentation said there was but I didn’t really understand how to make that happen.
Thanks as always.
Adam
Is there any way for something like this to be combined or enabled to work? To receive email notifications but also have the default calendar for submissions be the Main calendar?
<input type="hidden" name="submission_group" value="3" \>
<input type="hidden" name="send_email" value="1" />
Thanks!
Sure, a few things to untangle here – send_email is about sending a confirmation email to the person who submitted the event, not a notification to some event manager.
And I see what you’re saying – yes, the PUBLIC_NOTIFICATIONS_EMAIL config is only used if you’re submitting to the Public group (that’s getting renamed in LWC 3.0 to “Submissions” but the behavior is the same). So, of you’re configuring events to instead go into the Main Calendar group, emails will be instead sent to every user whose Primary Group is that Main Calendar group + who has email notifications enabled for their user.
If that doesn’t meet your need, then we can talk more about some additional custom coding that would allow for extra/custom email notifications to send the notifications you have in mind.
Ah. Thank you for that clarification.
Yeah, the problem is that we want one admin, or a group of admins, to receive notifications about submissions. Because we are admins, our primary group is Admin, so we’re not getting notifications for the Main Calendar group. So it’s kind of a circular problem.
Thank you!
Adam
Karl, we decided that we’re going to just use the default notification system and move the submissions to the Main calendar after they’ve been approved. That solves all if these issues. Thank you for the help!