Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ASK] How customise formbuilder with editForm #2489

Closed
starker-xp opened this issue Mar 2, 2020 · 8 comments
Closed

[ASK] How customise formbuilder with editForm #2489

starker-xp opened this issue Mar 2, 2020 · 8 comments
Labels

Comments

@starker-xp
Copy link

Environment

Please provide as many details as you can:

  • Hosting type
    • [] Form.io
    • [x ] Local deployment
      • Version:
  • Formio.js version: 4.7.8
  • Frontend framework:
  • Browser:
  • Browser version:

Steps to Reproduce

I want to customize the form editor. On a field of type 'select' I want to delete the data sources 'resource' and 'indexeddb'. Do you have an example?

   editForm: {
    textfield: [
      {
        key: 'logic',
        ignore: true,
      },
      {
        key: 'layout',
        ignore: true,
      },
    ],
    select: [
      {
        key: 'data',
        ignore: false,
        components: [
          {
            key: 'dataSrc',
            ignore: false,
            tooltip: 'My new tooltip',  // Not working
            label: 'Custom Label', // Not working
            data: {  // Not working
              values: [ // Not working
                {label: 'Values',value: 'values'}, // Not working
                {label: 'URL',value: 'url'}, // Not working
                {label: 'Custom',value: 'custom'},  // Not working
                {label: 'Raw JSON',value: 'json'} // Not working
              ]
            }
          },
        ],
      },
    ],
  },
}```

## Expected behavior
I want remove option in Data Source Type select 
@starker-xp starker-xp added the bug label Mar 2, 2020
@starker-xp starker-xp changed the title [BUG] [ASK] How customise formbuilder with editForm Mar 2, 2020
@wag110894
Copy link
Contributor

Hello @starker-xp , Have you taken a look at this example: https://formio.github.io/formio.js/app/examples/custombuilder.html?

Looking forward to your response.

@starker-xp
Copy link
Author

Hello @wag110894, I have already seen this example. The documentation does not cover my request. I want to customize certain fields not to deactivate them.

I want customise this select with remove 2 options.
https://imgur.com/a/6al6xNV

@wag110894
Copy link
Contributor

Can you resend the imgur?

@starker-xp
Copy link
Author

sorry
https://imgur.com/a/MmvIDKa

@starker-xp
Copy link
Author

Do you have an idea @wag110894 ?
Looking forward to your response.

@wag110894
Copy link
Contributor

Hello @starker-xp,

We would need to investigate how to accomplish this a part of a support package. Please let us know if you are interested by reaching out to support@form.io.

The other option would be to read the source code and try to figure it out how to accomplish this.

I hope that this helps.

Thank you.

@yuzdeng
Copy link

yuzdeng commented Mar 18, 2020

Hello, @wag110894,
Is there any update here. I checked the source code. The default config of the system can not be changed by outside. The unifyComponents function only merge the key that system don't have. If the key that system already have the config from outside will not take effect.

So is there any possible that changing the unifyComponents function to make it merge the config from outside?

@olgabann
Copy link

We're currently addressing a backlog of GitHub issues. Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants