Deployment of Umbraco Form Definitions across environments
Hi,
Hopefully someone will be able to provide advice on the following:
Our Aim
To be able to build forms within our development environment and deploy these through our test and then production environments. On submission of a form, the customer should be redirected to a form-specific page.
Environments
Our test and production environments split the Umbraco FrontEnd from the BackOffice so the FrontEnd can scale. We use Azure auto-scaling. We are on Forms version 7.0.3.
Problem
We can build forms in our development environment, include the form and workflow JSON definition files in our source repository, and deploy through the environments without a problem. The problem we have hit is that rather than use the inbuilt "Thank you" message, we want to redirect customers to a form-specific page after submission.
When defining the form, you are able to pick the page (the nodeID) that the form should redirect to after submission as part of the default workflow. This is stored in the JSON definition file. When moving between environments, the nodeIDs won't match so we get an error.
Yes, we can update the form definition in the production BackOffice to use the correct page but this means:
This would need updating for every form after every site deployment
which isn't viable, and,
The workflow JSON files updated on the BackOffice instance won't be on the Frontend instances.
Has anyone come across an approach for dealing with this? We're scratching our heads...
In Contour you had the ability to set a value for XPathOnSubmit to specify the XPath to redirect to after form submission to avoid this problem.
The XPathOnSubmit option is still visible in the workflow json definition file on disk, but whether it's functionality has been ported across to Umbraco Forms - worth a try? setting it in the Json file?
I suppose you could do something hacky in /views/partials/forms/form.cshtml
If (Model.SubmitHandled){
//redirect based on a value in Model.MessageOnSubmit
}
I think the formstate is stored in TempData["umbracoformsform"]
You might be able to access that if you hijack the route the form is on... and intercept.
Deployment of Umbraco Form Definitions across environments
Hi,
Hopefully someone will be able to provide advice on the following:
Our Aim
To be able to build forms within our development environment and deploy these through our test and then production environments. On submission of a form, the customer should be redirected to a form-specific page.
Environments
Our test and production environments split the Umbraco FrontEnd from the BackOffice so the FrontEnd can scale. We use Azure auto-scaling. We are on Forms version 7.0.3.
Problem
We can build forms in our development environment, include the form and workflow JSON definition files in our source repository, and deploy through the environments without a problem. The problem we have hit is that rather than use the inbuilt "Thank you" message, we want to redirect customers to a form-specific page after submission.
When defining the form, you are able to pick the page (the nodeID) that the form should redirect to after submission as part of the default workflow. This is stored in the JSON definition file. When moving between environments, the nodeIDs won't match so we get an error. Yes, we can update the form definition in the production BackOffice to use the correct page but this means:
Has anyone come across an approach for dealing with this? We're scratching our heads...
Many thanks.
Hi John
In Contour you had the ability to set a value for XPathOnSubmit to specify the XPath to redirect to after form submission to avoid this problem.
The XPathOnSubmit option is still visible in the workflow json definition file on disk, but whether it's functionality has been ported across to Umbraco Forms - worth a try? setting it in the Json file?
Although I've just found this: http://issues.umbraco.org/issue/CON-1275
So feels like it's probably not going to work :-(
I suppose you could do something hacky in /views/partials/forms/form.cshtml
If (Model.SubmitHandled){ //redirect based on a value in Model.MessageOnSubmit }
I think the formstate is stored in TempData["umbracoformsform"] You might be able to access that if you hijack the route the form is on... and intercept.
Hmm
regards
Marc
is working on a reply...