It doesn't seen that the DeliveryApi can trigger e-mails being sent.
Then editors can't be notified and the user can't get a reciept.
Are we missing something out or has this been forgotten?
It doesn't seen that the DeliveryApi can trigger e-mails being sent.
Then editors can't be notified and the user can't get a reciept.
Are we missing something out or has this been forgotten?
Furthermore we are not able to attach a NotificationSubscriber to form submissions submitted through the delivery API - it only seems to work for submissions submitted through the frontend on a solution. If we can trigger a notification here we can send emails this way, but it seems this is not possible either.
Tried with FormOnAfterSubmitSaveSubscriber
Class FormOnAfterSubmitSaveSubscriber | Dynamicweb 10 Developer Documentation
and OnAfterSubmitSave
Class Notifications.FormsViewModelFrontend.OnAfterSubmitSaveArgs | Dynamicweb 10 Developer Documentation
Is there another NotificationSubscriber that is suited for this?
Hi
This is somewhat undocumented - but it should work like this.
In settings create a form settings instance that defines what should happen when a form is submitted - like when you insert a form on a paragraph
That will give you a settings ID:
That setting id can be used with the POST endpoint that takes a setting.
And true - notifications are not fired in this context.
BR Nicolai
Hi Nicolai
Using the POST endpoint with the setting ID works great and a mail is sent, however I am having a hard time getting values from the form into the mail.
I've initially tried a Swift email page with template tags like; {{Form.Field.[SystemName].Value}}, {{Global:Request.Host}} and {{Form.Name}} but I am not getting any values in the mail. The same page works when posting the form from the frontend.
Same goes for the 'Automatic' setting and some of the older standard templates. Both .html and .cshtml.
Do you know if it's an error on my end or is there a bug somewhere?
Thanks
Tobias
Hi Tobias
It is a viewmodel template - so like this in the top of the template:
@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Forms.FormReceiptViewModel>
https://doc.dynamicweb.dev/api/Dynamicweb.Forms.FormReceiptViewModel.html
Thanks Nicolai
Works perfectly!
//Tobias
You must be logged in to post in the forum