I am trying to configure the standard forms when you click Create. I would like to remove them all, and then be able to add new ones with the required fields needs.
In Umbraco 10, the forms does not exist and neither does the js calling it (GetFormTemplates). So is there a way to configure this part?
I was hoping of doing it like I am adding/removing fieldtypes, but is that possible or should I go another route?
Then to make your own - you do it by overriding the static asset class that's built into Umbraco Forms. That static asset class can be pulled from nuget, or you can just browse it from git https://www.nuget.org/packages/Umbraco.Forms.StaticAssets/12.1.1
Choose the package explorer on the right to peruse the assets.
You then put your own form templates in AppPlugins/UmbracoForms/Data/Templates
and they will override the static assets embedded. You likely don't currently have an UmbracoForms folder in AppPlugins - you just create it for the overrides - all that stuff is now in the class.
One thing I noticed - I tried to update the existing contactform.js - and it wouldn't override it (likely due to the name - and me hiding the built in ones via the appsettings.js) - But my new ones were recognized right away and it worked great. I just call my contact form contactusform.js and we were good to go!
I did not find this documented - but appsettings for Forms were documented, but not the template addition/overrides (i think these work in old forms too), I guessed on that when reading the documentation for forms localization, there they discuss using the overrides of static assets to add languages - I then assumed this would work, and it did!
Add and remove default templates
Hi,
I am trying to configure the standard forms when you click Create. I would like to remove them all, and then be able to add new ones with the required fields needs.
In Umbraco 10, the forms does not exist and neither does the js calling it (GetFormTemplates). So is there a way to configure this part?
I was hoping of doing it like I am adding/removing fieldtypes, but is that possible or should I go another route?
Is this not possible or could anyone point me in a direction of where to look?
I ran into this problem as well today. But I found / figured out the solution!
To remove the default forms from the create list - add this configuration to the appsettings.js
Then to make your own - you do it by overriding the static asset class that's built into Umbraco Forms. That static asset class can be pulled from nuget, or you can just browse it from git https://www.nuget.org/packages/Umbraco.Forms.StaticAssets/12.1.1 Choose the package explorer on the right to peruse the assets.
You then put your own form templates in AppPlugins/UmbracoForms/Data/Templates and they will override the static assets embedded. You likely don't currently have an UmbracoForms folder in AppPlugins - you just create it for the overrides - all that stuff is now in the class.
One thing I noticed - I tried to update the existing contactform.js - and it wouldn't override it (likely due to the name - and me hiding the built in ones via the appsettings.js) - But my new ones were recognized right away and it worked great. I just call my contact form contactusform.js and we were good to go!
I did not find this documented - but appsettings for Forms were documented, but not the template addition/overrides (i think these work in old forms too), I guessed on that when reading the documentation for forms localization, there they discuss using the overrides of static assets to add languages - I then assumed this would work, and it did!
Hi Brian,
That absolutely worked like a charm. Perfekt for my scenario.
Thanks alot for your help!
is working on a reply...