How to remove individual options (such as Display/Label Position or Data/Persistent).

Open
#1,047 2 comments 0 reactions 1 assignee View on GitHub

@Tatsiana8 is already working on this.

Since Jul 10, 2024.

Assessment

This issue has not been assessed yet.

Description

question

Hello.
How can you remove individual options in the components so that only the most important settings are displayed?

I've already tried this, but I can't remove the "Label Position" option:

Formio.builder(document.getElementById('builder'), {}, {
  builder: {
    basic: false,
    advanced: false,
    data: false,
    layout: false,
    premium: false,
    
    customBasic: {
      title: 'Formularfelder',
      default: true,
      weight: 0,
      components: {
        textfield: true,
        textarea: true,
        email: true,
        phoneNumber: true
      }
    }
    
  },
  
  editForm: {
    textfield: [
      { key: 'api', ignore: true },
      { key: 'logic', ignore: true },
      { key: 'layout', ignore: true },
      { key: 'conditional', ignore: true },
      { key: 'labelPosition', ignore: true },
      { key: 'display.labelPosition', ignore: true },
      { labelPosition: false },
    ]
  }
  
}).then(function(builder) {
  builder.on('saveComponent', function() {
    console.log(builder.schema);
  });
});

Is there somehow an overview of the “key” names used?

Dominant language
TypeScript
Stars
706
Forks
493
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from formio/angular

All issues in formio/angular

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.