Is there a way to remove first paragraph element from form edition in drupal 9?

616 views Asked by At

In my node form creation, I'm trying to form_alter the default paragraph behavior. I have a required paragraph in my node form but the paragraph field is just required if one of those fields is filled, otherwise, the user is not required to fill the required fields of the paragraph field.

I'm trying to remove the first paragraph's initial element, but the button to add more does not appear, that way, the user cannot add the first paragraph if they want :/

Is there a way to remove the first initial paragraph element from node form add?

1

There are 1 answers

0
Julio Alves On

I solved this problem by going to the Content Types > Manage > My Content Type > Form Display > and changing the Widget Settings of my paragraph field at Default Field type settings, which you can set a default paragraph when creating a new entity or not.