Im trying to hide some fields only when opened from relation controller... anyone have any idea how this can be achieved please?
If you're using the RelationController Behavior, you create a
config_relation.yaml file. In this you define things like
relation: view: list: $/acme/plugin/models/attribute/columns.yaml form: $/acme/plugin/models/attribute/fields.yaml manage: list: $/acme/plugin/models/attribute/columns.yaml form: $/acme/plugin/models/attribute/fields.yaml showSearch: true recordsPerPage: 20 defaultSort: column: name direction: asc
Other than you might think, you don't have to put in the same
columns.yaml as you use for the related model's form controller. It can be anything you want, basically.
In your case you want to adjust the file used in
relation.manage.form. This way you can hide fields in the list or the form or wherever you need to.
1-2 of 2