To send an email on CustumForm submission, I have tried the new Content Updated Event in WorkFlow. It works fine but it is triggered before data validation. So, the mail can be sent even with an empty message, if ReCaptcha words are not correct...
I don't use the Publish Event, triggered after data validation, because here the CustomForm SaveContentItem option is false. I don't use the Create event that is also triggered before data validation. Anyway, to minimize database when the SaveContentItem option is false, I don't create a persistent contentItem (http://orchard.codeplex.com/workitem/19940)
A solution is to trigger a generic event after data validation in CustomForms ItemController.cs (as for the Rules event):
Right now I still use Orchard 1.6.1 and Orchard.Rules, and I can use this solution for Orchard 1.7 and WorkFlow, but I prefer to use source code without modification
@jtkech created: https://orchard.codeplex.com/workitem/20032
To send an email on CustumForm submission, I have tried the new Content Updated Event in WorkFlow. It works fine but it is triggered before data validation. So, the mail can be sent even with an empty message, if ReCaptcha words are not correct...
I don't use the Publish Event, triggered after data validation, because here the CustomForm SaveContentItem option is false. I don't use the Create event that is also triggered before data validation. Anyway, to minimize database when the SaveContentItem option is false, I don't create a persistent contentItem (http://orchard.codeplex.com/workitem/19940)
A solution is to trigger a generic event after data validation in CustomForms ItemController.cs (as for the Rules event):
_workflowManager.TriggerEvent(SignalActivity.SignalEventName, contentItem, () => new Dictionary<string, object> { { Content", contentItem }, { SignalActivity.SignalEventName, contentItem.ContentType + " Submitted" } });
Right now I still use Orchard 1.6.1 and Orchard.Rules, and I can use this solution for Orchard 1.7 and WorkFlow, but I prefer to use source code without modification
Thanks