I have installed Umbraco forms and i need up override the default sending email method as I would like to use Hangfire, and also need to do some other stuff on submission of a form.
I have tried creating a controller which inherits UmbracoFormsController and then created on override for every method, put a break point in these and then submitted a form, none of these break points were hit.
Where am i going wrong/ could someone point me in the right direction?
The site is running 7.13.2 assembly: 1.0.6974.19955
Overriding forms sending email method
Hi all,
I have installed Umbraco forms and i need up override the default sending email method as I would like to use Hangfire, and also need to do some other stuff on submission of a form.
I have tried creating a controller which inherits
UmbracoFormsController
and then created on override for every method, put a break point in these and then submitted a form, none of these break points were hit.Where am i going wrong/ could someone point me in the right direction?
The site is running 7.13.2 assembly: 1.0.6974.19955
Form version 7.0.6
Here is the code i have currently:
Thanks, Lewis
Hi Lewis,
Instead of overriding the default controller. I would suggest creating a custom workflow - https://our.umbraco.com/documentation/Add-ons/UmbracoForms/Developer/Extending/Adding-a-Workflowtype
You can then remove the default send email and use your own workflow in its place via the UI
Matt.
Hi Matthew,
I have just tried this, is it possible that all forms run through this custom workflow?
Do i have to choose this workflow on the form somehow or does the ID put in the constructor have to match the ID of the form?
I am calling the form using:
This is what I have now, when loading the page with the form it hits the constructor but when submitting the form both methods are not hit...
Thanks, Lewis
Hi Matthew,
Okay i found where i add the custom workflow, so i understand now.
Thanks for you help!
Lewis
Glad you found it :)
is working on a reply...