I want to hijack the "on-submit" event. I have a database table that I want to save the form data to but i have specific pre-insert logic I need to perform. I created the form from my datasource, my workflow doesn't trigger until it's too late. Umbraco Forms tries to save the record before I can inject the necessary values for my database constraints (not part of the form data.)
My assumption is that I need to get to the on-submit event before the postback occurs?
I am trying to achieve a similar behaviour to inject some logic before the actual on-submit kicks in and then continue the rest of the workflow as it is. If you were able to achieve this or any custom solution you made to make it possible can you please share it ?
Umbraco forms - on submit
I want to hijack the "on-submit" event. I have a database table that I want to save the form data to but i have specific pre-insert logic I need to perform. I created the form from my datasource, my workflow doesn't trigger until it's too late. Umbraco Forms tries to save the record before I can inject the necessary values for my database constraints (not part of the form data.)
My assumption is that I need to get to the on-submit event before the postback occurs?
Hi Max
You can try to use javascript to hijack the "on-submit" event. Like that:
Thanks,
Alex
That will prevent the post back as well, correct?
Thanks, Max
Hello Max,
I am trying to achieve a similar behaviour to inject some logic before the actual on-submit kicks in and then continue the rest of the workflow as it is. If you were able to achieve this or any custom solution you made to make it possible can you please share it ?
Thanks, Namrata
Namrata,
This issue was quite a long time ago, I'm not actually sure what the resolution was.
I can definitely say, I probably did not try that solution - it was not part of the Umbraco backend.
Max
is working on a reply...