I'm attempting to setup a site using Umbraco Forms and am in need of posting off the data to a CRM. Usually, I would achieve this using "Post to URL" workflow but in this project, we need to know whether the record has been successfully submitted or not. If the submission fails, we redirect to an error page, otherwise, if it's successful, we redirect to a thank you page.
As far as I know, this can't be achieved with Workflows because they're executed separately.
The only solution I have right now is to hijack with JavaScript or a custom controller but neither feels like the right solution.
Is there anyway to subscribe to Umbraco Form events or otherwise perform an action on submission, and make actions based on it?
When I say successfully submitted I mean that the form data reaches the CRM, so not validation.
The process would be the user submits the form, the data is sent to the CRM and if the CRM returns a success, we redirect to a thank you page. Else, redirect to an error page.
Hi, I want to validate form data using javascript before the workflow is executed. Where should I add the js script? I donĀ“t know how to run any js script before the workflow is executed. Thanks.
Hijacking Form Submit
Hi,
I'm attempting to setup a site using Umbraco Forms and am in need of posting off the data to a CRM. Usually, I would achieve this using "Post to URL" workflow but in this project, we need to know whether the record has been successfully submitted or not. If the submission fails, we redirect to an error page, otherwise, if it's successful, we redirect to a thank you page.
As far as I know, this can't be achieved with Workflows because they're executed separately.
The only solution I have right now is to hijack with JavaScript or a custom controller but neither feels like the right solution.
Is there anyway to subscribe to Umbraco Form events or otherwise perform an action on submission, and make actions based on it?
Thanks,
Ben
Hi Ben
What do you mean by successfully submitted? Do you need to do some validation? I believe that validation can be done before workflows.
Thanks,
Alex
Thanks Alex,
When I say successfully submitted I mean that the form data reaches the CRM, so not validation.
The process would be the user submits the form, the data is sent to the CRM and if the CRM returns a success, we redirect to a thank you page. Else, redirect to an error page.
Thanks,
Ben
Your first instinct was correct. Custom coding this in JavaScript would be the proper way to handle it.
Hi, I want to validate form data using javascript before the workflow is executed. Where should I add the js script? I donĀ“t know how to run any js script before the workflow is executed. Thanks.
is working on a reply...