formio / angular

JSON powered forms for Angular
https://formio.github.io/angular-demo
MIT License
648 stars 473 forks source link

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

Open iceman-fx opened 10 months ago

iceman-fx commented 10 months ago

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?

Ugurercin commented 8 months ago

I have been looking for the same answer. Any updates on this one ?

lane-formio commented 2 months ago

You can modify the editForm of each component here is an example (but in react).

Let me know if that works for you.