Jeffrey Schoemaker submitted an issue for Umbraco Forms to allow hiding existing field types, and also mentioned that an upcoming version of Steroids will support this via a config file(see http://issues.umbraco.org/issue/CON-1196).
I'm wondering if you'd be willing to share now what you guys are doing to implement this? I need this for my own custom field types, so I don't confuse my editors with too many similar options!
you could tweak it already yourselves pretty easy.
Just go to /App_Plugins/UmbracoForms/Backoffice/Form/overlays/fieldtypepicker/fieldtypepicker.controller.js and find the init()-function (line 17) and replace the init()-function with the following code:
vm.ExcludedFieldTypes = ["3e170f26-1fcb-4f60-b5d2-1aa2723528fd"]; // The GUID's you want to exclude as a comma seperated list
function init() {
formResource.getAllFieldTypesWithSettings()
.then(function (response) {
vm.fieldTypes = [];
angular.forEach(response.data, function (key, value) {
console.log(value);
if (vm.ExcludedFieldTypes.indexOf(value.Id) === -1)
vm.fieldTypes.push(value);
});
//vm.fieldTypes = response.data;
});
}
And because it looks like UmbracoForms bundles all its javascript-files into one big file you have to do it in the file /App_Plugins/UmbracoForms/BackOffice/js/umbraco.forms.js (line 2316) too. (Or just do it in this one, because the first one isn't used).
Et voilá; just hide field types you don't want to use.
The only cool stuff we have to do in our package is make it a bit smarter so updating your Umbraco Forms installation won't override this code.
But if you can wait for one more week; we expect to have in the package by next week.
How to hide default fieldtypes?
Jeffrey Schoemaker submitted an issue for Umbraco Forms to allow hiding existing field types, and also mentioned that an upcoming version of Steroids will support this via a config file(see http://issues.umbraco.org/issue/CON-1196).
I'm wondering if you'd be willing to share now what you guys are doing to implement this? I need this for my own custom field types, so I don't confuse my editors with too many similar options!
Hi Brian,
you could tweak it already yourselves pretty easy.
Just go to /App_Plugins/UmbracoForms/Backoffice/Form/overlays/fieldtypepicker/fieldtypepicker.controller.js and find the init()-function (line 17) and replace the init()-function with the following code:
And because it looks like UmbracoForms bundles all its javascript-files into one big file you have to do it in the file /App_Plugins/UmbracoForms/BackOffice/js/umbraco.forms.js (line 2316) too. (Or just do it in this one, because the first one isn't used).
Et voilá; just hide field types you don't want to use.
The only cool stuff we have to do in our package is make it a bit smarter so updating your Umbraco Forms installation won't override this code.
But if you can wait for one more week; we expect to have in the package by next week.
Cheerio,
Jeffrey
p.s.: I'm wondering which custom field types you have :)? I'm always interested in the way you implement Umbraco (Forms).
Hi Brian,
We've updated the package and it supports this functionality now. Please read our blog for how it works: https://www.perplex.nl/blog/2016/umbraco-forms-on-perplex-steroids/
Cheers, Jeffrey
is working on a reply...