formio / angular

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

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

Open iceman-fx opened 3 months ago

iceman-fx commented 3 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 1 month ago

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