umbraco / Umbraco.Forms.Issues

Public issue tracker for Umbraco Forms
30 stars 0 forks source link

Ability to disable core & custom answer types and workflows from the install #61

Closed Ultradata-CXP closed 3 years ago

Ultradata-CXP commented 5 years ago

We would like an interface which enable core and custom answer types and workflows to be disabled.

An option to control this is via a custom 'config' ribbon item we have built in the site. How might we include the ability to disable core answer types and workflows?

sussexrick commented 5 years ago

As a workaround you can rename them and move them to the end of the list: example

Myster commented 5 years ago

for field types you can hack the field-type-picker.html and add this angular condition ng-class="{hide: fieldType.name == 'File upload'}" More details here: https://our.umbraco.com/forum/umbraco-forms/84514-umbraco-forms-disable-answer-type

Alkaersig commented 5 years ago

Yes please! I have been digging everywhere to find a way to hide the default workflows. They just adds extra complexity / confusion for the end-user. We have implemented our own custom worksflows and dont need they default ones, but the user are still able to select them and they take up space.

enkelmedia commented 4 years ago

I would also like to see this, we have the need to disable some FieldTypes and some WorkflowTypes, I would love to see this implemented as a BuilderCollection like ie. ContentFinders and Components.

https://www.zpqrtbnk.net/posts/composing-umbraco-v8-collections/

enkelmedia commented 4 years ago

Turns out that this is already fixed,

[ComposeAfter(typeof(UmbracoFormsComposer))]
public class MySiteComposer : IUserComposer
{
    public void Compose(Composition composition)
    {
        // Workflows
        composition.WithCollectionBuilder<WorkflowCollectionBuilder>().Clear();
        composition.WithCollectionBuilder<WorkflowCollectionBuilder>().Add<ContactTargetWorkflow>();

        // Field types
        composition.WithCollectionBuilder<FieldCollectionBuilder>().Exclude<Recaptcha2>();
    }
}

When I first tested this my Composer did not have the ComposeAfter-attribute, but after adding this it worked fine.

[ComposeAfter(typeof(UmbracoFormsComposer))]

Apart of these two collection there's also some other collections that can be modified during Composition:

composition.WithCollectionBuilder<DataSourceCollectionBuilder>()
composition.WithCollectionBuilder<ExportCollectionBuilder>()
composition.WithCollectionBuilder<FieldPreValueSourceCollectionBuilder>()
composition.WithCollectionBuilder<RecordSetActionCollectionBuilder>()

I don't think that this is documented but it should for sure be something that HQ puts on the TODO-list =D

umbrabot commented 3 years ago

Hiya @Ultradata-CXP,

Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more.

We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed).

To open it this issue up again, you can write @umbrabot still relevant in a new comment as the first line. It would be super helpful for us if on the next line you could let us know why you think it's still relevant.

For example:

@umbrabot still relevant This bug can still be reproduced in version x.y.z

This will reopen the issue in the next few hours.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face: