Peter
Peter

Reputation: 1

How do I add a default text field that any new crafter component will have no matter what component type

I want the ability to include a text field on any of the components my users use in crafter. Just like Intnernal Name is automatically added to every component. So whether I bring up component Type A or component Type B, it will automatically have this field without having to manually add it to every component.

I assume I have to modify some crafter code but not sure where?

Thank you.

Upvotes: 0

Views: 60

Answers (1)

sumerz
sumerz

Reputation: 1446

If you need a cross-cutting field that's in all/most components, you should consider inheritance:

https://docs.craftercms.org/en/3.1/developers/content-inheritance.html

Upvotes: 1

Related Questions